Skip to content
Snippets Groups Projects
Commit 010b65e8 authored by kalpak's avatar kalpak
Browse files

b=16199
i=adilger
i=girish

ctime should not be updated through filter_set_md()
parent c5ef7497
No related branches found
No related tags found
No related merge requests found
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;
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;
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;
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;
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment