Whamcloud - gitweb
LU-12637 kernel: RHEL 8.1 server support
[fs/lustre-release.git] / ldiskfs / kernel_patches / patches / rhel8.1 / ext4-inode-version.patch
1 Index: linux-4.18.0-32.el8.x86_64/fs/ext4/ialloc.c
2 ===================================================================
3 --- linux-4.18.0-32.el8.x86_64.orig/fs/ext4/ialloc.c
4 +++ linux-4.18.0-32.el8.x86_64/fs/ext4/ialloc.c
5 @@ -1100,6 +1100,7 @@ got:
6         ei->i_dtime = 0;
7         ei->i_block_group = group;
8         ei->i_last_alloc_group = ~0;
9 +       ei->i_fs_version = 0;
10  
11         ext4_set_inode_flags(inode);
12         if (IS_DIRSYNC(inode))
13 Index: linux-4.18.0-32.el8.x86_64/fs/ext4/ext4.h
14 ===================================================================
15 --- linux-4.18.0-32.el8.x86_64.orig/fs/ext4/ext4.h
16 +++ linux-4.18.0-32.el8.x86_64/fs/ext4/ext4.h
17 @@ -1058,6 +1058,8 @@ struct ext4_inode_info {
18         struct dquot *i_dquot[MAXQUOTAS];
19  #endif
20  
21 +       __u64 i_fs_version;
22 +
23         /* Precomputed uuid+inum+igen checksum for seeding inode checksums */
24         __u32 i_csum_seed;
25  
26 Index: linux-4.18.0-147.0.3.el8.x86_64/fs/ext4/inode.c
27 ===================================================================
28 --- linux-4.18.0-147.0.3.el8.x86_64.orig/fs/ext4/inode.c
29 +++ linux-4.18.0-147.0.3.el8.x86_64/fs/ext4/inode.c
30 @@ -4800,14 +4800,14 @@ static inline void ext4_inode_set_iversi
31         if (unlikely(EXT4_I(inode)->i_flags & EXT4_EA_INODE_FL))
32                 inode_set_iversion_raw(inode, val);
33         else
34 -               inode_set_iversion_queried(inode, val);
35 +               EXT4_I(inode)->i_fs_version = val;
36  }
37  static inline u64 ext4_inode_peek_iversion(const struct inode *inode)
38  {
39         if (unlikely(EXT4_I(inode)->i_flags & EXT4_EA_INODE_FL))
40                 return inode_peek_iversion_raw(inode);
41         else
42 -               return inode_peek_iversion(inode);
43 +               return EXT4_I(inode)->i_fs_version;
44  }
45  
46  struct inode *__ext4_iget(struct super_block *sb, unsigned long ino,