Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1684dd03 authored by Yan, Zheng's avatar Yan, Zheng Committed by Ilya Dryomov
Browse files

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: default avatar"Yan, Zheng" <zyan@redhat.com>
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
parent 92e57e62
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -756,6 +756,9 @@ ssize_t __ceph_getxattr(struct inode *inode, const char *name, void *value,
	/* let's see if a virtual xattr was requested */
	vxattr = ceph_match_vxattr(inode, name);
	if (vxattr) {
		err = ceph_do_getattr(inode, 0, true);
		if (err)
			return err;
		err = -ENODATA;
		if (!(vxattr->exists_cb && !vxattr->exists_cb(ci)))
			err = vxattr->getxattr_cb(ci, value, size);