From: Theodore Ts'o Date: Thu, 19 Apr 2007 05:53:53 +0000 (-0400) Subject: Define the l_i_iversion field in ext2_inode X-Git-Tag: E2FSPROGS-1_40~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d362a3fb7ec1a2b46601f55f4dbae83563c27717;p=thirdparty%2Fe2fsprogs.git Define the l_i_iversion field in ext2_inode The l_i_version field is now defined from the old l_i_reserved1 field in the ext2 inode. This field will be used to store high 32 bits of the 64-bit inode version number. Signed-off-by: "Theodore Ts'o" --- diff --git a/debugfs/ChangeLog b/debugfs/ChangeLog index 8a3748cde..630cc28dc 100644 --- a/debugfs/ChangeLog +++ b/debugfs/ChangeLog @@ -1,3 +1,8 @@ +2007-04-19 Theodore Tso + + * set_fields.c: Add the i_version field to the set_inode_field + command. + 2007-04-13 Theodore Tso * set_fields.c (do_set_block_group_descriptor), debug_cmds.ct, diff --git a/debugfs/set_fields.c b/debugfs/set_fields.c index bd9b98ea1..b50ff7cc8 100644 --- a/debugfs/set_fields.c +++ b/debugfs/set_fields.c @@ -128,6 +128,7 @@ static struct field_set_info inode_fields[] = { { "links_count", &set_inode.i_links_count, 2, parse_uint }, { "blocks", &set_inode.i_blocks, 4, parse_uint }, { "flags", &set_inode.i_flags, 4, parse_uint }, + { "version", &set_inode.osd1.linux1.l_i_version, 4, parse_uint }, { "translator", &set_inode.osd1.hurd1.h_i_translator, 4, parse_uint }, { "block", &set_inode.i_block[0], 4, parse_uint, FLAG_ARRAY, EXT2_NDIR_BLOCKS }, diff --git a/lib/ext2fs/ChangeLog b/lib/ext2fs/ChangeLog index 9b2125199..17672367c 100644 --- a/lib/ext2fs/ChangeLog +++ b/lib/ext2fs/ChangeLog @@ -1,3 +1,9 @@ +2007-04-19 Theodore Tso + + * ext2_fs.h, swapfs.c (ext2fs_swap_inode_full): Rename the + l_i_reserved1 field to be l_i_version (to be used for the + high 32 bits of the 64-bit inode version number). + 2007-04-18 Theodore Tso * getsize.c (ext2fs_get_device_size): Make sure we don't leak a diff --git a/lib/ext2fs/ext2_fs.h b/lib/ext2fs/ext2_fs.h index 354ed1d89..3b3a099d6 100644 --- a/lib/ext2fs/ext2_fs.h +++ b/lib/ext2fs/ext2_fs.h @@ -310,7 +310,7 @@ struct ext2_inode { __u32 i_flags; /* File flags */ union { struct { - __u32 l_i_reserved1; + __u32 l_i_version; /* was l_i_reserved1 */ } linux1; struct { __u32 h_i_translator; @@ -366,7 +366,7 @@ struct ext2_inode_large { __u32 i_flags; /* File flags */ union { struct { - __u32 l_i_reserved1; + __u32 l_i_version; /* was l_i_reserved1 */ } linux1; struct { __u32 h_i_translator; diff --git a/lib/ext2fs/swapfs.c b/lib/ext2fs/swapfs.c index f437109ad..a214ad4fa 100644 --- a/lib/ext2fs/swapfs.c +++ b/lib/ext2fs/swapfs.c @@ -172,8 +172,8 @@ void ext2fs_swap_inode_full(ext2_filsys fs, struct ext2_inode_large *t, switch (fs->super->s_creator_os) { case EXT2_OS_LINUX: - t->osd1.linux1.l_i_reserved1 = - ext2fs_swab32(f->osd1.linux1.l_i_reserved1); + t->osd1.linux1.l_i_version = + ext2fs_swab32(f->osd1.linux1.l_i_version); t->osd2.linux2.l_i_blocks_hi = ext2fs_swab16(f->osd2.linux2.l_i_blocks_hi); t->osd2.linux2.i_pad1 = ext2fs_swab16(f->osd2.linux2.i_pad1);