From fc2e2e9c43e3b3f5dec8a02b17ee3d6343d9783a Mon Sep 17 00:00:00 2001 From: Martin Brandenburg Date: Tue, 12 Dec 2017 13:46:30 -0500 Subject: 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 Signed-off-by: Mike Marshall --- fs/orangefs/inode.c | 1 + 1 file changed, 1 insertion(+) (limited to 'fs/orangefs/inode.c') 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; } -- cgit v1.2.3