Whamcloud - gitweb
742d0abc53dd1ef111666df3bba930609c768c79
[fs/lustre-release.git] / ldiskfs / kernel_patches / patches / ext4-ext_generation-sles11.patch
1 Index: linux-2.6.27.21-0.1/fs/ext4/ext4_extents.h
2 ===================================================================
3 --- linux-2.6.27.21-0.1.orig/fs/ext4/ext4_extents.h
4 +++ linux-2.6.27.21-0.1/fs/ext4/ext4_extents.h
5 @@ -203,6 +203,11 @@ static inline unsigned short ext_depth(s
6         return le16_to_cpu(ext_inode_hdr(inode)->eh_depth);
7  }
8  
9 +static inline void ext4_ext_tree_changed(struct inode *inode)
10 +{
11 +        EXT4_I(inode)->i_ext_generation++;
12 +}
13 +
14  static inline void
15  ext4_ext_invalidate_cache(struct inode *inode)
16  {
17 Index: linux-2.6.27.21-0.1/fs/ext4/ext4_i.h
18 ===================================================================
19 --- linux-2.6.27.21-0.1.orig/fs/ext4/ext4_i.h
20 +++ linux-2.6.27.21-0.1/fs/ext4/ext4_i.h
21 @@ -114,6 +114,7 @@ struct ext4_inode_info {
22         struct inode vfs_inode;
23         struct jbd2_inode jinode;
24  
25 +        unsigned long i_ext_generation;
26         struct ext4_ext_cache i_cached_extent;
27         /*
28          * File creation time. Its function is same as that of
29 Index: linux-2.6.27.21-0.1/fs/ext4/extents.c
30 ===================================================================
31 --- linux-2.6.27.21-0.1.orig/fs/ext4/extents.c
32 +++ linux-2.6.27.21-0.1/fs/ext4/extents.c
33 @@ -1618,6 +1618,7 @@ cleanup:
34                 ext4_ext_drop_refs(npath);
35                 kfree(npath);
36         }
37 +       ext4_ext_tree_changed(inode);
38         ext4_ext_invalidate_cache(inode);
39         return err;
40  }
41 @@ -2278,6 +2279,7 @@ static int ext4_ext_remove_space(struct 
42                 }
43         }
44  out:
45 +       ext4_ext_tree_changed(inode);
46         ext4_ext_drop_refs(path);
47         kfree(path);
48         ext4_journal_stop(handle);