Whamcloud - gitweb
Define the l_i_iversion field in ext2_inode
authorTheodore Ts'o <tytso@mit.edu>
Thu, 19 Apr 2007 05:53:53 +0000 (01:53 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 19 Apr 2007 05:53:53 +0000 (01:53 -0400)
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" <tytso@mit.edu>
debugfs/ChangeLog
debugfs/set_fields.c
lib/ext2fs/ChangeLog
lib/ext2fs/ext2_fs.h
lib/ext2fs/swapfs.c

index 8a3748c..630cc28 100644 (file)
@@ -1,3 +1,8 @@
+2007-04-19  Theodore Tso  <tytso@mit.edu>
+
+       * set_fields.c: Add the i_version field to the set_inode_field
+               command.
+
 2007-04-13  Theodore Tso  <tytso@mit.edu>
 
        * set_fields.c (do_set_block_group_descriptor), debug_cmds.ct,
index bd9b98e..b50ff7c 100644 (file)
@@ -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 },
index 9b21251..1767236 100644 (file)
@@ -1,3 +1,9 @@
+2007-04-19  Theodore Tso  <tytso@mit.edu>
+
+       * 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  <tytso@mit.edu>
 
        * getsize.c (ext2fs_get_device_size): Make sure we don't leak a
index 354ed1d..3b3a099 100644 (file)
@@ -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;
index f437109..a214ad4 100644 (file)
@@ -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);