summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/xattr.c
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fusionio.com>2012-10-11 15:53:56 -0400
committerChris Mason <chris.mason@fusionio.com>2012-12-16 20:46:21 -0500
commite99761514999f64aff1985460967f93d9e8417f4 (patch)
tree67bd13d96325679bde7244d69cce501840b63796 /fs/btrfs/xattr.c
parent5f3ab90a72f98adbf00c50ac2d4d2b47cf4a9685 (diff)
downloadop-kernel-dev-e99761514999f64aff1985460967f93d9e8417f4.zip
op-kernel-dev-e99761514999f64aff1985460967f93d9e8417f4.tar.gz
Btrfs: only log the inode item if we can get away with it
Currently we copy all the file information into the log, inode item, the refs, xattrs etc. Except most of this doesn't change from fsync to fsync, just the inode item changes. So set a flag if an xattr changes or a link is added, and otherwise only log the inode item. Thanks, Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/xattr.c')
-rw-r--r--fs/btrfs/xattr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/xattr.c b/fs/btrfs/xattr.c
index aef6bb3..446a684 100644
--- a/fs/btrfs/xattr.c
+++ b/fs/btrfs/xattr.c
@@ -208,6 +208,7 @@ int __btrfs_setxattr(struct btrfs_trans_handle *trans,
inode_inc_iversion(inode);
inode->i_ctime = CURRENT_TIME;
+ set_bit(BTRFS_INODE_COPY_EVERYTHING, &BTRFS_I(inode)->runtime_flags);
ret = btrfs_update_inode(trans, root, inode);
BUG_ON(ret);
out:
OpenPOWER on IntegriCloud