From e40f8b8ebe9bcf2bef17d54e3cfb25beeb1c3cff Mon Sep 17 00:00:00 2001 From: kalpak Date: Wed, 23 Jul 2008 07:59:35 +0000 Subject: [PATCH] b=16199 i=adilger,girish add ext3-xattr-no-update-ctime patch to rhel4 series --- .../patches/ext3-xattr-no-update-ctime-rhel4.patch | 65 ++++++++++++++++++++++ .../kernel_patches/series/ldiskfs-2.6-rhel4.series | 1 + 2 files changed, 66 insertions(+) create mode 100644 ldiskfs/kernel_patches/patches/ext3-xattr-no-update-ctime-rhel4.patch 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 index 0000000..6d23206 --- /dev/null +++ b/ldiskfs/kernel_patches/patches/ext3-xattr-no-update-ctime-rhel4.patch @@ -0,0 +1,65 @@ +Index: linux-2.6.9-67/include/linux/ext3_fs.h +=================================================================== +--- linux-2.6.9-67.orig/include/linux/ext3_fs.h ++++ linux-2.6.9-67/include/linux/ext3_fs.h +@@ -874,6 +874,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/fs/ext3/xattr.c +=================================================================== +--- linux-2.6.9-67.orig/fs/ext3/xattr.c ++++ linux-2.6.9-67/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 *, +@@ -1209,12 +1209,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: +@@ -1231,7 +1231,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; +@@ -1305,7 +1305,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/series/ldiskfs-2.6-rhel4.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel4.series index d5f361d..a358e58 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel4.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel4.series @@ -27,3 +27,4 @@ ext3-iam-2.6.9-rhel4.patch ext3-orphans-delay.patch ext3-external-journal-2.6.9.patch ext3-max-dir-size.patch +ext3-xattr-no-update-ctime-rhel4.patch -- 1.8.3.1