2006-11-11 Theodore Tso <tytso@mit.edu>
+ * swapfs.c (ext2fs_swap_super):
+ ext2_fs.h: Add definition of EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE,
+ which adds s_min_extra_isize and s_want_extra_isize fields
+ to superblock, which allow specifying the minimum and
+ desired i_extra_isize fields in large inodes
+ (for nsec+epoch timestamps, potential other uses).
+ Needs RO_COMPAT flag handling, needs e2fsck support,
+ patch complete, little testing.
+
* swapfs.c (ext2fs_swap_super):
ext2_fs.h: Add definition of EXT4_FEATURE_INCOMPAT_64BIT,
which adds supports for 64-bit block count fields in the
__u16 i_uid; /* Low 16 bits of Owner Uid */
__u32 i_size; /* Size in bytes */
__u32 i_atime; /* Access time */
- __u32 i_ctime; /* Creation time */
+ __u32 i_ctime; /* Inode change time */
__u32 i_mtime; /* Modification time */
__u32 i_dtime; /* Deletion Time */
__u16 i_gid; /* Low 16 bits of Group Id */
__u16 i_uid; /* Low 16 bits of Owner Uid */
__u32 i_size; /* Size in bytes */
__u32 i_atime; /* Access time */
- __u32 i_ctime; /* Creation time */
+ __u32 i_ctime; /* Inode Change time */
__u32 i_mtime; /* Modification time */
__u32 i_dtime; /* Deletion Time */
__u16 i_gid; /* Low 16 bits of Group Id */
} osd2; /* OS dependent 2 */
__u16 i_extra_isize;
__u16 i_pad1;
+ __u32 i_ctime_extra; /* extra Change time (nsec << 2 | epoch) */
+ __u32 i_mtime_extra; /* extra Modification time (nsec << 2 | epoch) */
+ __u32 i_atime_extra; /* extra Access time (nsec << 2 | epoch) */
+ __u32 i_crtime; /* File creation time */
+ __u32 i_crtime_extra; /* extra File creation time (nsec << 2 | epoch)*/
};
#define i_size_high i_dir_acl
__u32 s_blocks_count_hi; /* Blocks count high 32bits */
__u32 s_r_blocks_count_hi; /* Reserved blocks count high 32 bits*/
__u32 s_free_blocks_hi; /* Free blocks count */
- __u32 s_reserved[169]; /* Padding to the end of the block */
+ __u16 s_min_extra_isize; /* All inodes have at least # bytes */
+ __u16 s_want_extra_isize; /* New inodes should reserve # bytes */
+ __u32 s_reserved[168]; /* Padding to the end of the block */
};
/*
#define EXT4_FEATURE_RO_COMPAT_HUGE_FILE 0x0008
#define EXT4_FEATURE_RO_COMPAT_GDT_CSUM 0x0010
#define EXT4_FEATURE_RO_COMPAT_DIR_NLINK 0x0020
+#define EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE 0x0040
#define EXT2_FEATURE_INCOMPAT_COMPRESSION 0x0001
#define EXT2_FEATURE_INCOMPAT_FILETYPE 0x0002
sb->s_default_mount_opts = ext2fs_swab32(sb->s_default_mount_opts);
sb->s_first_meta_bg = ext2fs_swab32(sb->s_first_meta_bg);
sb->s_mkfs_time = ext2fs_swab32(sb->s_mkfs_time);
+ sb->s_blocks_count_hi = ext2fs_swab32(sb->s_blocks_count_hi);
+ sb->s_r_blocks_count_hi = ext2fs_swab32(sb->s_r_blocks_count_hi);
+ sb->s_free_blocks_hi = ext2fs_swab32(sb->s_free_blocks_hi);
+ sb->s_min_extra_isize = ext2fs_swab16(sb->s_min_extra_isize);
+ sb->s_want_extra_isize = ext2fs_swab16(sb->s_want_extra_isize);
for (i=0; i < 4; i++)
sb->s_hash_seed[i] = ext2fs_swab32(sb->s_hash_seed[i]);
for (i=0; i < 17; i++)