diff options
author | Yan, Zheng <zyan@redhat.com> | 2017-06-14 03:54:56 -0400 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2017-07-07 11:25:13 -0400 |
commit | 1684dd03e9f59212775cafa50ea77b9ef5b263db (patch) | |
tree | c09f6611a70dbda9e36bd71f0887a0e56bb592c8 /fs/ceph | |
parent | 92e57e6287cc7402487edf3eb09c8a7b36dad63f (diff) |
ceph: getattr before read on ceph.* xattrs
Previously we were returning values for quota, layout
xattrs without any kind of update -- the user just got
whatever happened to be in our cache.
Clearly this extra round trip has a cost, but reads of
these xattrs are fairly rare, happening on admin
intervention rather than in normal operation.
Link: http://tracker.ceph.com/issues/17939
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/xattr.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c index 75267cdd5dfd..11263f102e4c 100644 --- a/fs/ceph/xattr.c +++ b/fs/ceph/xattr.c | |||
@@ -756,6 +756,9 @@ ssize_t __ceph_getxattr(struct inode *inode, const char *name, void *value, | |||
756 | /* let's see if a virtual xattr was requested */ | 756 | /* let's see if a virtual xattr was requested */ |
757 | vxattr = ceph_match_vxattr(inode, name); | 757 | vxattr = ceph_match_vxattr(inode, name); |
758 | if (vxattr) { | 758 | if (vxattr) { |
759 | err = ceph_do_getattr(inode, 0, true); | ||
760 | if (err) | ||
761 | return err; | ||
759 | err = -ENODATA; | 762 | err = -ENODATA; |
760 | if (!(vxattr->exists_cb && !vxattr->exists_cb(ci))) | 763 | if (!(vxattr->exists_cb && !vxattr->exists_cb(ci))) |
761 | err = vxattr->getxattr_cb(ci, value, size); | 764 | err = vxattr->getxattr_cb(ci, value, size); |