PERFORCE change 164273 for review
Aditya Sarawgi
truncs at FreeBSD.org
Sat Jun 13 14:33:24 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=164273
Change 164273 by truncs at aditya on 2009/06/13 14:32:41
New inode on-disk struct.
Affected files ...
.. //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/ext2_fs.h#18 edit
Differences ...
==== //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/ext2_fs.h#18 (text+ko) ====
@@ -259,82 +259,36 @@
/*
* Structure of an inode on the disk
*/
-struct ext2_inode {
- __u16 i_mode; /* File mode */
- __u16 i_uid; /* Owner Uid */
- __u32 i_size; /* Size in bytes */
- __u32 i_atime; /* Access time */
- __u32 i_ctime; /* Creation time */
- __u32 i_mtime; /* Modification time */
- __u32 i_dtime; /* Deletion Time */
- __u16 i_gid; /* Group Id */
- __u16 i_links_count; /* Links count */
- __u32 i_blocks; /* Blocks count */
- __u32 i_flags; /* File flags */
- union {
- struct {
- __u32 l_i_reserved1;
- } linux1;
- struct {
- __u32 h_i_translator;
- } hurd1;
- struct {
- __u32 m_i_reserved1;
- } masix1;
- } osd1; /* OS dependent 1 */
- __u32 i_block[EXT2_N_BLOCKS];/* Pointers to blocks */
- __u32 i_generation; /* File version (for NFS) */
- __u32 i_file_acl; /* File ACL */
- __u32 i_dir_acl; /* Directory ACL */
- __u32 i_faddr; /* Fragment address */
- union {
- struct {
- __u8 l_i_frag; /* Fragment number */
- __u8 l_i_fsize; /* Fragment size */
- __u16 i_pad1;
- __u32 l_i_reserved2[2];
- } linux2;
- struct {
- __u8 h_i_frag; /* Fragment number */
- __u8 h_i_fsize; /* Fragment size */
- __u16 h_i_mode_high;
- __u16 h_i_uid_high;
- __u16 h_i_gid_high;
- __u32 h_i_author;
- } hurd2;
- struct {
- __u8 m_i_frag; /* Fragment number */
- __u8 m_i_fsize; /* Fragment size */
- __u16 m_pad1;
- __u32 m_i_reserved2[2];
- } masix2;
- } osd2; /* OS dependent 2 */
+struct ext2fs_dinode {
+ u_int16_t e2di_mode; /* 0: IFMT, permissions; see below. */
+ u_int16_t e2di_uid; /* 2: Owner UID */
+ u_int32_t e2di_size; /* 4: Size (in bytes) */
+ u_int32_t e2di_atime; /* 8: Acces time */
+ u_int32_t e2di_ctime; /* 12: Create time */
+ u_int32_t e2di_mtime; /* 16: Modification time */
+ u_int32_t e2di_dtime; /* 20: Deletion time */
+ u_int16_t e2di_gid; /* 24: Owner GID */
+ u_int16_t e2di_nlink; /* 26: File link count */
+ u_int32_t e2di_nblock; /* 28: Blocks count */
+ u_int32_t e2di_flags; /* 32: Status flags (chflags) */
+ u_int32_t e2di_linux_reserved1; /* 36 */
+ u_int32_t e2di_blocks[NDADDR+NIADDR]; /* 40: disk blocks */
+ u_int32_t e2di_gen; /* 100: generation number */
+ u_int32_t e2di_facl; /* 104: file ACL (not implemented) */
+ u_int32_t e2di_dacl; /* 108: dir ACL (not implemented) */
+ u_int32_t e2di_faddr; /* 112: fragment address */
+ u_int8_t e2di_nfrag; /* 116: fragment number */
+ u_int8_t e2di_fsize; /* 117: fragment size */
+ u_int16_t e2di_linux_reserved2; /* 118 */
+ u_int16_t e2di_uid_high; /* 120: Owner UID top 16 bits */
+ u_int16_t e2di_gid_high; /* 122: Owner GID top 16 bits */
+ u_int32_t e2di_linux_reserved3; /* 124 */
};
-#define i_size_high i_dir_acl
-#if defined(__KERNEL__) || defined(__linux__)
-#define i_reserved1 osd1.linux1.l_i_reserved1
-#define i_frag osd2.linux2.l_i_frag
-#define i_fsize osd2.linux2.l_i_fsize
-#define i_reserved2 osd2.linux2.l_i_reserved2
-#endif
-#ifdef __hurd__
-#define i_translator osd1.hurd1.h_i_translator
-#define i_frag osd2.hurd2.h_i_frag;
-#define i_fsize osd2.hurd2.h_i_fsize;
-#define i_uid_high osd2.hurd2.h_i_uid_high
-#define i_gid_high osd2.hurd2.h_i_gid_high
-#define i_author osd2.hurd2.h_i_author
-#endif
+#define i_size_high i_dir_acl
-#ifdef __masix__
-#define i_reserved1 osd1.masix1.m_i_reserved1
-#define i_frag osd2.masix2.m_i_frag
-#define i_fsize osd2.masix2.m_i_fsize
-#define i_reserved2 osd2.masix2.m_i_reserved2
-#endif
/*
* File clean flags
More information about the p4-projects
mailing list