ext2的inode结构

来源:互联网 发布:nginx 前后端分离 编辑:程序博客网 时间:2024/06/05 07:35

ext2文件系统的inode结构体:


struct   ext2_inode {

            __le16  i_mode;

__le16  i_uid;

__le16  i_gid;

__le16  i_links_count;

////////////////////////////////////

__le32  i_atime;

__le32  i_ctime;

__le32  i_mtime;

__le32  i_dtime;

//////////////////////////////////

__le32  i_blocks;

__le32  i_flages;


//////////////////////////////////////////////////////////////////////////////////////////////////

__le32  i_block[EXT2_N_BLOCKS];

__le32  i_generation;

__le32  i_file_acl;

__le32  i_dir_acl;

__le32  i_faddr;


/////////////////////////////////////////////////////////////////////////////////////////////////

union  {

             struct  {

                     __le32   l_i_reserved1;

             } linux1;

             struct {

                     __le32  h_i_traslator;

             } hurd1;

             struct {

                     __le32  m_i_reserved1;

            } masix1;

} osd1;

///////////////////////////////////////////////////////////////////////////////////////////////////

union {

struct {

 __u8       l_i_frag;

 __u8       l_i_fsize;

 __u16      i_pad1;

       __le16     l_i_uid_high;
       __le16     l_i_gid_high;

             __u32     l_i_reserved2;

         } linux2;

         struct {

                     __u8     h_i_frag;

                     __u8     h_i_fsize;

                     __le16   h_i_mode_high;

                     __le16   h_i_uid_high;

                     __le16   h_i_gid_high;

                     __le32   h_i_author;

         } hurd2;

     struct {

                 __u8    m_i_frag;

                 __u8    m_i_fsize;

                 __u16   m_pad1;

                 __u32   m_i_reserved2[2];

     } masix2;

      } osd2;

};




0 0
原创粉丝点击