Whamcloud - gitweb
LU-6137 ldiskfs: simplify nocmtime patch 05/13705/2
authorNiu Yawei <yawei.niu@intel.com>
Tue, 10 Feb 2015 03:21:00 +0000 (22:21 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 3 Mar 2015 16:47:46 +0000 (16:47 +0000)
Simplify the nocmtime patch by patching only ext4_current_time(),
this fixed the defect that original patch doesn't handle setacl
code path, it can also avoid the risk of future changes adding
new places that needs to be fixed.

Remove the obsolete xattr-no-update-ctime patch.

Signed-off-by: Anreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I02928c4f867e9476f0bc1815dd3256e3d79dadf7
Reviewed-on: http://review.whamcloud.com/13705
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
ldiskfs/kernel_patches/patches/rhel6.3/ext4-nocmtime-2.6.patch
ldiskfs/kernel_patches/patches/rhel6.3/ext4-xattr-no-update-ctime.patch [deleted file]
ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.4.series
ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.5.series
ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.6.series
ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.series
ldiskfs/kernel_patches/series/ldiskfs-2.6-sles11.series
ldiskfs/kernel_patches/series/ldiskfs-3.0-sles11.series
ldiskfs/kernel_patches/series/ldiskfs-3.0-sles11sp3.series

index eec475a..bbc8853 100644 (file)
@@ -1,23 +1,14 @@
---- linux-2.6.18-194.3.1/fs/ext4/xattr.c       2010-11-23 21:13:35.000000000 -0800
-+++ linux-2.6.18-194.3.1-liang/fs/ext4/xattr.c 2010-11-25 20:15:27.000000000 -0800
-@@ -1050,7 +1050,7 @@ ext4_xattr_set_handle(handle_t *handle, 
-       }
-       if (!error) {
-               ext4_xattr_update_super_block(handle, inode->i_sb);
--              if (!(flags & XATTR_NO_CTIME))
-+              if (!IS_NOCMTIME(inode) && !(flags & XATTR_NO_CTIME))
-                       inode->i_ctime = ext4_current_time(inode);
-               if (!value)
-                       EXT4_I(inode)->i_state &= ~EXT4_STATE_NO_EXPAND;
---- linux-2.6.18-194.3.1/fs/ext4/namei.c       2010-11-23 21:13:35.000000000 -0800
-+++ linux-2.6.18-194.3.1-liang/fs/ext4/namei.c 2010-11-25 20:17:25.000000000 -0800
-@@ -1465,7 +1465,8 @@ static int add_dirent_to_buf(handle_t *h
-        * happen is that the times are slightly out of date
-        * and/or different from the directory change time.
-        */
--      dir->i_mtime = dir->i_ctime = ext4_current_time(dir);
-+      if (!IS_NOCMTIME(dir))
-+              dir->i_mtime = dir->i_ctime = ext4_current_time(dir);
-       ext4_update_dx_flag(dir);
-       dir->i_version++;
-       ext4_mark_inode_dirty(handle, dir);
+Index: linux-stage/fs/ext4/ext4.h
+===================================================================
+--- linux-stage.orig/fs/ext4/ext4.h
++++ linux-stage/fs/ext4/ext4.h
+@@ -1213,6 +1213,9 @@ static inline struct ext4_inode_info *EX
+ static inline struct timespec ext4_current_time(struct inode *inode)
+ {
++      if (IS_NOCMTIME(inode))
++              return inode->i_ctime;
++
+       return (inode->i_sb->s_time_gran < NSEC_PER_SEC) ?
+               current_fs_time(inode->i_sb) : CURRENT_TIME_SEC;
+ }
diff --git a/ldiskfs/kernel_patches/patches/rhel6.3/ext4-xattr-no-update-ctime.patch b/ldiskfs/kernel_patches/patches/rhel6.3/ext4-xattr-no-update-ctime.patch
deleted file mode 100644 (file)
index 66de9df..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-Index: linux-2.6.18.i386/fs/ext4/ext4.h
-===================================================================
---- linux-2.6.18.i386.orig/fs/ext4/ext4.h
-+++ linux-2.6.18.i386/fs/ext4/ext4.h
-@@ -995,6 +995,13 @@ struct mmp_struct {
- extern struct proc_dir_entry *proc_root_ext4;
- /*
-+ * Indicates that ctime should not be updated in ext4_xattr_set_handle()
-+ */
-+#ifndef XATTR_NO_CTIME
-+#define XATTR_NO_CTIME 0x80
-+#endif
-+
-+/*
-  * Function prototypes
-  */
-Index: linux-2.6.18.i386/fs/ext4/xattr.c
-===================================================================
---- linux-2.6.18.i386.orig/fs/ext4/xattr.c
-+++ linux-2.6.18.i386/fs/ext4/xattr.c
-@@ -1026,7 +1026,8 @@ ext4_xattr_set_handle(handle_t *handle, 
-       }
-       if (!error) {
-               ext4_xattr_update_super_block(handle, inode->i_sb);
--              inode->i_ctime = ext4_current_time(inode);
-+              if (!(flags & XATTR_NO_CTIME))
-+                      inode->i_ctime = ext4_current_time(inode);
-               if (!value)
-                       EXT4_I(inode)->i_state &= ~EXT4_STATE_NO_EXPAND;
-               error = ext4_mark_iloc_dirty(handle, inode, &is.iloc);
index 55aad11..68f4c1c 100644 (file)
@@ -12,7 +12,6 @@ rhel6.3/ext4-inode-version.patch
 rhel6.4/ext4-mmp.patch
 rhel6.3/ext4-lookup-dotdot.patch
 rhel6.3/ext4-print-inum-in-htree-warning.patch
 rhel6.4/ext4-mmp.patch
 rhel6.3/ext4-lookup-dotdot.patch
 rhel6.3/ext4-print-inum-in-htree-warning.patch
-rhel6.3/ext4-xattr-no-update-ctime.patch
 rhel6.4/ext4-prealloc.patch
 rhel6.3/ext4-mballoc-extra-checks.patch
 rhel6.4/ext4-misc.patch
 rhel6.4/ext4-prealloc.patch
 rhel6.3/ext4-mballoc-extra-checks.patch
 rhel6.4/ext4-misc.patch
index f080888..7dc5eba 100644 (file)
@@ -12,7 +12,6 @@ rhel6.3/ext4-inode-version.patch
 rhel6.4/ext4-mmp.patch
 rhel6.3/ext4-lookup-dotdot.patch
 rhel6.3/ext4-print-inum-in-htree-warning.patch
 rhel6.4/ext4-mmp.patch
 rhel6.3/ext4-lookup-dotdot.patch
 rhel6.3/ext4-print-inum-in-htree-warning.patch
-rhel6.3/ext4-xattr-no-update-ctime.patch
 rhel6.4/ext4-prealloc.patch
 rhel6.3/ext4-mballoc-extra-checks.patch
 rhel6.4/ext4-misc.patch
 rhel6.4/ext4-prealloc.patch
 rhel6.3/ext4-mballoc-extra-checks.patch
 rhel6.4/ext4-misc.patch
index fefd631..7838a78 100644 (file)
@@ -11,7 +11,6 @@ sles11sp1/ext4-ext_generation.patch
 rhel6.3/ext4-inode-version.patch
 rhel6.3/ext4-lookup-dotdot.patch
 rhel6.3/ext4-print-inum-in-htree-warning.patch
 rhel6.3/ext4-inode-version.patch
 rhel6.3/ext4-lookup-dotdot.patch
 rhel6.3/ext4-print-inum-in-htree-warning.patch
-rhel6.3/ext4-xattr-no-update-ctime.patch
 rhel6.4/ext4-prealloc.patch
 rhel6.3/ext4-mballoc-extra-checks.patch
 rhel6.4/ext4-misc.patch
 rhel6.4/ext4-prealloc.patch
 rhel6.3/ext4-mballoc-extra-checks.patch
 rhel6.4/ext4-misc.patch
index 24557ed..51f2b2e 100644 (file)
@@ -12,7 +12,6 @@ rhel6.3/ext4-inode-version.patch
 rhel6.3/ext4-mmp.patch
 rhel6.3/ext4-lookup-dotdot.patch
 rhel6.3/ext4-print-inum-in-htree-warning.patch
 rhel6.3/ext4-mmp.patch
 rhel6.3/ext4-lookup-dotdot.patch
 rhel6.3/ext4-print-inum-in-htree-warning.patch
-rhel6.3/ext4-xattr-no-update-ctime.patch
 rhel6.3/ext4-prealloc.patch
 rhel6.3/ext4-mballoc-extra-checks.patch
 rhel6.3/ext4-misc.patch
 rhel6.3/ext4-prealloc.patch
 rhel6.3/ext4-mballoc-extra-checks.patch
 rhel6.3/ext4-misc.patch
index 78d6833..abe72c1 100644 (file)
@@ -13,7 +13,6 @@ rhel6.3/ext4-use-ext4_kvzalloc-ext4_kvmalloc-for-s_group_desc-and-s_group_info.p
 rhel6.3/ext4-mmp.patch
 rhel6.3/ext4-lookup-dotdot.patch
 rhel6.3/ext4-print-inum-in-htree-warning.patch
 rhel6.3/ext4-mmp.patch
 rhel6.3/ext4-lookup-dotdot.patch
 rhel6.3/ext4-print-inum-in-htree-warning.patch
-rhel6.3/ext4-xattr-no-update-ctime.patch
 rhel6.3/ext4-prealloc.patch
 rhel6.3/ext4-mballoc-extra-checks.patch
 rhel6.3/ext4-misc.patch
 rhel6.3/ext4-prealloc.patch
 rhel6.3/ext4-mballoc-extra-checks.patch
 rhel6.3/ext4-misc.patch
index e69fa59..99e607a 100644 (file)
@@ -16,7 +16,6 @@ sles11sp2/ext4-ext_generation.patch
 rhel6.3/ext4-inode-version.patch
 sles11sp2/ext4-lookup-dotdot.patch
 rhel6.3/ext4-print-inum-in-htree-warning.patch
 rhel6.3/ext4-inode-version.patch
 sles11sp2/ext4-lookup-dotdot.patch
 rhel6.3/ext4-print-inum-in-htree-warning.patch
-rhel6.3/ext4-xattr-no-update-ctime.patch
 sles11sp2/ext4-prealloc.patch
 sles11sp2/ext4-mballoc-extra-checks.patch
 sles11sp2/restore-path-in-walk_extent_callback.patch
 sles11sp2/ext4-prealloc.patch
 sles11sp2/ext4-mballoc-extra-checks.patch
 sles11sp2/restore-path-in-walk_extent_callback.patch
index 7a9f122..ef56002 100644 (file)
@@ -16,7 +16,6 @@ sles11sp2/ext4-ext_generation.patch
 rhel6.3/ext4-inode-version.patch
 sles11sp2/ext4-lookup-dotdot.patch
 rhel6.3/ext4-print-inum-in-htree-warning.patch
 rhel6.3/ext4-inode-version.patch
 sles11sp2/ext4-lookup-dotdot.patch
 rhel6.3/ext4-print-inum-in-htree-warning.patch
-rhel6.3/ext4-xattr-no-update-ctime.patch
 sles11sp2/ext4-prealloc.patch
 sles11sp2/ext4-mballoc-extra-checks.patch
 sles11sp2/restore-path-in-walk_extent_callback.patch
 sles11sp2/ext4-prealloc.patch
 sles11sp2/ext4-mballoc-extra-checks.patch
 sles11sp2/restore-path-in-walk_extent_callback.patch