summaryrefslogtreecommitdiffstats
path: root/fs/orangefs/inode.c
diff options
context:
space:
mode:
authorMartin Brandenburg <martin@omnibond.com>2017-12-12 13:46:30 -0500
committerMike Marshall <hubcap@omnibond.com>2019-05-03 14:32:37 -0400
commitfc2e2e9c43e3b3f5dec8a02b17ee3d6343d9783a (patch)
tree9a2b34f3f93eac859d2caad075f6dec85205736f /fs/orangefs/inode.c
parent37624b58542fb9f2d9a70e6ea006ef8a5f66c30b (diff)
downloadlinux-stable-fc2e2e9c43e3b3f5dec8a02b17ee3d6343d9783a.tar.gz
linux-stable-fc2e2e9c43e3b3f5dec8a02b17ee3d6343d9783a.tar.bz2
linux-stable-fc2e2e9c43e3b3f5dec8a02b17ee3d6343d9783a.zip
orangefs: implement xattr cache
This uses the same timeout as the getattr cache. This substantially increases performance when writing files with smaller buffer sizes. When writing, the size is (often) changed, which causes a call to notify_change which calls security_inode_need_killpriv which needs a getxattr. Caching it reduces traffic to the server. Signed-off-by: Martin Brandenburg <martin@omnibond.com> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Diffstat (limited to 'fs/orangefs/inode.c')
-rw-r--r--fs/orangefs/inode.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c
index c3334eca18c7..b47765ea6870 100644
--- a/fs/orangefs/inode.c
+++ b/fs/orangefs/inode.c
@@ -364,6 +364,7 @@ static int orangefs_set_inode(struct inode *inode, void *data)
struct orangefs_object_kref *ref = (struct orangefs_object_kref *) data;
ORANGEFS_I(inode)->refn.fs_id = ref->fs_id;
ORANGEFS_I(inode)->refn.khandle = ref->khandle;
+ hash_init(ORANGEFS_I(inode)->xattr_cache);
return 0;
}