Whamcloud - gitweb
LU-653 i_version shouldn't be used for VBR
authorMikhail Pershin <tappro@whamcloud.com>
Wed, 7 Sep 2011 06:26:31 +0000 (10:26 +0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 16 Sep 2011 04:23:10 +0000 (00:23 -0400)
RHEL6 plus EXT4 combination cause i_version is to be used to store
Lustre versions instead of i_fs_version. Meanwhile this field is used
by ext4 internally and may be changed breaking Lustre recovery.

Patch makes only i_fs_version to be used for versions.

Change-Id: Idf7cd257aa2d288abce2a7c18c4d8b139bc9c5c6
Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1342
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Yu Jian <yujian@whamcloud.com>
lustre/lvfs/fsfilt_ext3.c

index f0b91df..271f194 100644 (file)
@@ -216,20 +216,12 @@ static char *fsfilt_ext3_uuid(struct super_block *sb)
 
 static __u64 get_i_version(struct inode *inode)
 {
 
 static __u64 get_i_version(struct inode *inode)
 {
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)) && defined(HAVE_EXT4_LDISKFS)
-        return inode->i_version;
-#else
         return EXT3_I(inode)->i_fs_version;
         return EXT3_I(inode)->i_fs_version;
-#endif
 }
 
 static void set_i_version(struct inode *inode, __u64 new_version)
 {
 }
 
 static void set_i_version(struct inode *inode, __u64 new_version)
 {
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)) && defined(HAVE_EXT4_LDISKFS)
-        inode->i_version = new_version;
-#else
         (EXT3_I(inode))->i_fs_version = new_version;
         (EXT3_I(inode))->i_fs_version = new_version;
-#endif
 }
 
 /*
 }
 
 /*