Whamcloud - gitweb
b=16199
authorkalpak <kalpak>
Sat, 19 Jul 2008 13:21:18 +0000 (13:21 +0000)
committerkalpak <kalpak>
Sat, 19 Jul 2008 13:21:18 +0000 (13:21 +0000)
i=adilger
i=girish

ctime should not be updated through filter_set_md()

ldiskfs/kernel_patches/patches/ext3-xattr-no-update-ctime-2.6-sles10.patch [new file with mode: 0644]
ldiskfs/kernel_patches/patches/ext3-xattr-no-update-ctime-2.6.22-vanilla.patch [new file with mode: 0644]
ldiskfs/kernel_patches/patches/ext3-xattr-no-update-ctime-rhel4.patch [new file with mode: 0644]
ldiskfs/kernel_patches/patches/ext3-xattr-no-update-ctime-suse.patch [new file with mode: 0644]
ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel4.series
ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel5.series
ldiskfs/kernel_patches/series/ldiskfs-2.6-sles10.series
ldiskfs/kernel_patches/series/ldiskfs-2.6-suse.series
ldiskfs/kernel_patches/series/ldiskfs-2.6.22-vanilla.series

diff --git a/ldiskfs/kernel_patches/patches/ext3-xattr-no-update-ctime-2.6-sles10.patch b/ldiskfs/kernel_patches/patches/ext3-xattr-no-update-ctime-2.6-sles10.patch
new file mode 100644 (file)
index 0000000..5b5b907
--- /dev/null
@@ -0,0 +1,33 @@
+Index: linux-2.6.16.54-0.2.5/include/linux/ext3_fs.h
+===================================================================
+--- linux-2.6.16.54-0.2.5.orig/include/linux/ext3_fs.h
++++ linux-2.6.16.54-0.2.5/include/linux/ext3_fs.h
+@@ -913,6 +913,13 @@ struct mmp_struct {
+ #define EXT3_MMP_MIN_CHECK_INTERVAL   5
+ /*
++ * Indicates that ctime should not be updated in ext3_xattr_set_handle()
++ */
++#ifndef XATTR_NO_CTIME
++#define XATTR_NO_CTIME 0x80
++#endif
++
++/*
+  * Function prototypes
+  */
+Index: linux-2.6.16.54-0.2.5/fs/ext3/xattr.c
+===================================================================
+--- linux-2.6.16.54-0.2.5.orig/fs/ext3/xattr.c
++++ linux-2.6.16.54-0.2.5/fs/ext3/xattr.c
+@@ -1030,8 +1030,8 @@ ext3_xattr_set_handle(handle_t *handle, 
+       }
+       if (!error) {
+               ext3_xattr_update_super_block(handle, inode->i_sb);
+-              inode->i_ctime = ext3_current_time(inode);
+-
++              if (!(flags & XATTR_NO_CTIME))
++                      inode->i_ctime = ext3_current_time(inode);
+               error = ext3_mark_iloc_dirty(handle, inode, &is.iloc);
+               if (!value)
+                       EXT3_I(inode)->i_state &= ~EXT3_STATE_NO_EXPAND;
diff --git a/ldiskfs/kernel_patches/patches/ext3-xattr-no-update-ctime-2.6.22-vanilla.patch b/ldiskfs/kernel_patches/patches/ext3-xattr-no-update-ctime-2.6.22-vanilla.patch
new file mode 100644 (file)
index 0000000..2fe2f47
--- /dev/null
@@ -0,0 +1,32 @@
+Index: linux-2.6.22.14/include/linux/ext3_fs.h
+===================================================================
+--- linux-2.6.22.14.orig/include/linux/ext3_fs.h
++++ linux-2.6.22.14/include/linux/ext3_fs.h
+@@ -923,6 +923,13 @@ struct mmp_struct {
+ #define EXT3_MMP_MIN_CHECK_INTERVAL   5
+ /*
++ * Indicates that ctime should not be updated in ext3_xattr_set_handle()
++ */
++#ifndef XATTR_NO_CTIME
++#define XATTR_NO_CTIME 0x80
++#endif
++
++/*
+  * Function prototypes
+  */
+Index: linux-2.6.22.14/fs/ext3/xattr.c
+===================================================================
+--- linux-2.6.22.14.orig/fs/ext3/xattr.c
++++ linux-2.6.22.14/fs/ext3/xattr.c
+@@ -1039,7 +1039,8 @@ ext3_xattr_set_handle(handle_t *handle, 
+       }
+       if (!error) {
+               ext3_xattr_update_super_block(handle, inode->i_sb);
+-              inode->i_ctime = ext3_current_time(inode);
++              if (!(flags & XATTR_NO_CTIME))
++                      inode->i_ctime = ext3_current_time(inode);
+               error = ext3_mark_iloc_dirty(handle, inode, &is.iloc);
+               if (!value)
+                       EXT3_I(inode)->i_state &= ~EXT3_STATE_NO_EXPAND;
diff --git a/ldiskfs/kernel_patches/patches/ext3-xattr-no-update-ctime-rhel4.patch b/ldiskfs/kernel_patches/patches/ext3-xattr-no-update-ctime-rhel4.patch
new file mode 100644 (file)
index 0000000..b9e1802
--- /dev/null
@@ -0,0 +1,65 @@
+Index: linux-2.6.9-67.0.20/include/linux/ext3_fs.h
+===================================================================
+--- linux-2.6.9-67.0.20.orig/include/linux/ext3_fs.h
++++ linux-2.6.9-67.0.20/include/linux/ext3_fs.h
+@@ -873,6 +873,13 @@ struct mmp_struct {
+ #define EXT3_MMP_MIN_CHECK_INTERVAL   5
+ /*
++ * Indicates that ctime should not be updated in ext3_xattr_set_handle()
++ */
++#ifndef XATTR_NO_CTIME
++#define XATTR_NO_CTIME 0x80
++#endif
++
++/*
+  * Function prototypes
+  */
+Index: linux-2.6.9-67.0.20/fs/ext3/xattr.c
+===================================================================
+--- linux-2.6.9-67.0.20.orig/fs/ext3/xattr.c
++++ linux-2.6.9-67.0.20/fs/ext3/xattr.c
+@@ -91,7 +91,7 @@
+ static int ext3_xattr_set_handle2(handle_t *, struct inode *,
+                                 struct buffer_head *,
+-                                struct ext3_xattr_header *);
++                                struct ext3_xattr_header *, int);
+ static int ext3_xattr_cache_insert(struct buffer_head *);
+ static struct buffer_head *ext3_xattr_cache_find(handle_t *, struct inode *,
+@@ -1215,12 +1215,12 @@ skip_replace:
+               /* This block is now empty. */
+               if (bh && header == HDR(bh))
+                       unlock_buffer(bh);  /* we were modifying in-place. */
+-              error = ext3_xattr_set_handle2(handle, inode, bh, NULL);
++              error = ext3_xattr_set_handle2(handle, inode, bh, NULL, flags);
+       } else {
+               ext3_xattr_rehash(header, here);
+               if (bh && header == HDR(bh))
+                       unlock_buffer(bh);  /* we were modifying in-place. */
+-              error = ext3_xattr_set_handle2(handle, inode, bh, header);
++              error = ext3_xattr_set_handle2(handle, inode, bh, header, flags);
+       }
+ cleanup:
+@@ -1237,7 +1237,7 @@ cleanup:
+ static int
+ ext3_xattr_set_handle2(handle_t *handle, struct inode *inode,
+                      struct buffer_head *old_bh,
+-                     struct ext3_xattr_header *header)
++                     struct ext3_xattr_header *header, int flags)
+ {
+       struct super_block *sb = inode->i_sb;
+       struct buffer_head *new_bh = NULL;
+@@ -1311,7 +1311,8 @@ getblk_failed:
+       /* Update the inode. */
+       EXT3_I(inode)->i_file_acl = new_bh ? new_bh->b_blocknr : 0;
+-      inode->i_ctime = ext3_current_time(inode);
++      if (!(flags & XATTR_NO_CTIME))
++              inode->i_ctime = ext3_current_time(inode);
+       ext3_mark_inode_dirty(handle, inode);
+       if (IS_SYNC(inode))
+               handle->h_sync = 1;
diff --git a/ldiskfs/kernel_patches/patches/ext3-xattr-no-update-ctime-suse.patch b/ldiskfs/kernel_patches/patches/ext3-xattr-no-update-ctime-suse.patch
new file mode 100644 (file)
index 0000000..6301584
--- /dev/null
@@ -0,0 +1,59 @@
+Index: linux-2.6.5-7.311/include/linux/ext3_fs.h
+===================================================================
+--- linux-2.6.5-7.311.orig/include/linux/ext3_fs.h
++++ linux-2.6.5-7.311/include/linux/ext3_fs.h
+@@ -752,6 +752,13 @@ struct dir_private_info {
+ #define ERR_BAD_DX_DIR        -75000
+ /*
++ * Indicates that ctime should not be updated in ext3_xattr_set_handle()
++ */
++#ifndef XATTR_NO_CTIME
++#define XATTR_NO_CTIME 0x80
++#endif
++
++/*
+  * Function prototypes
+  */
+Index: linux-2.6.5-7.311/fs/ext3/xattr.c
+===================================================================
+--- linux-2.6.5-7.311.orig/fs/ext3/xattr.c
++++ linux-2.6.5-7.311/fs/ext3/xattr.c
+@@ -89,7 +89,7 @@
+ static int ext3_xattr_set_handle2(handle_t *, struct inode *,
+                                 struct buffer_head *,
+-                                struct ext3_xattr_header *);
++                                struct ext3_xattr_header *, int);
+ static int ext3_xattr_cache_insert(struct buffer_head *);
+ static struct buffer_head *ext3_xattr_cache_find(struct inode *,
+@@ -1302,7 +1302,7 @@ skip_replace:
+       }
+       error = ext3_xattr_set_handle2(handle, inode, bh,
+                                      IS_LAST_ENTRY(ENTRY(header+1)) ?
+-                                     NULL : header);
++                                     NULL : header, flags);
+ cleanup:
+       brelse(bh);
+@@ -1318,7 +1318,7 @@ cleanup:
+ static int
+ ext3_xattr_set_handle2(handle_t *handle, struct inode *inode,
+                      struct buffer_head *old_bh,
+-                     struct ext3_xattr_header *header)
++                     struct ext3_xattr_header *header, int flags)
+ {
+       struct super_block *sb = inode->i_sb;
+       struct buffer_head *new_bh = NULL;
+@@ -1401,7 +1401,8 @@ getblk_failed:
+       /* Update the inode. */
+       EXT3_I(inode)->i_file_acl = new_bh ? new_bh->b_blocknr : 0;
+-      inode->i_ctime = CURRENT_TIME;
++      if (!(flags & XATTR_NO_CTIME))
++              inode->i_ctime = CURRENT_TIME;
+       ext3_mark_inode_dirty(handle, inode);
+       if (IS_SYNC(inode))
+               handle->h_sync = 1;
index b08377e..4d64d37 100644 (file)
@@ -25,3 +25,4 @@ ext3-fiemap-stub-suse.patch
 ext3-external-journal-2.6.9.patch
 ext3-max-dir-size.patch
 ext3-print-inum-in-htree-warning.patch
+ext3-xattr-no-update-ctime-rhel4.patch
index 5e20e49..f0eb3a9 100644 (file)
@@ -22,3 +22,4 @@ ext3-lookup-dotdot-2.6.9.patch
 ext3-max-dir-size.patch
 ext3-print-inum-in-htree-warning.patch
 ext3-block-bitmap-validation-2.6-rhel5.patch
+ext3-xattr-no-update-ctime-2.6.22-vanilla.patch
index 952f260..779e134 100644 (file)
@@ -26,3 +26,4 @@ ext3-lookup-dotdot-2.6.9.patch
 ext3-max-dir-size.patch
 ext3-print-inum-in-htree-warning.patch
 ext3-block-bitmap-validation-2.6-sles10.patch
+ext3-xattr-no-update-ctime-2.6-sles10.patch
index ce02d10..1f728c0 100644 (file)
@@ -24,3 +24,4 @@ ext3-fiemap-stub-suse.patch
 ext3-external-journal-2.6.5.patch
 ext3-max-dir-size-2.6.5-suse.patch
 ext3-print-inum-in-htree-warning.patch
+ext3-xattr-no-update-ctime-suse.patch
index 23a30fc..46226a5 100644 (file)
@@ -22,3 +22,4 @@ ext3-unlink-race.patch
 ext3-export-journal-api.patch
 ext3-max-dir-size.patch
 ext3-print-inum-in-htree-warning.patch
+ext3-xattr-no-update-ctime-2.6.22-vanilla.patch