]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: force an attr fetch for ceph xattrs
authorVenky Shankar <vshankar@redhat.com>
Fri, 28 Aug 2020 07:42:23 +0000 (03:42 -0400)
committerVenky Shankar <vshankar@redhat.com>
Tue, 13 Oct 2020 04:29:38 +0000 (00:29 -0400)
Without this fetching a ceph.* xattr which was just set
returns -ENODATA.

Signed-off-by: Venky Shankar <vshankar@redhat.com>
src/client/Client.cc

index 123457ea5c721842a2d3b9fc286d5e406b93cc4c..75cf13652d8dfbb5ee12c0217336e69afdd8244f 100644 (file)
@@ -11728,7 +11728,7 @@ int Client::_getxattr(Inode *in, const char *name, void *value, size_t size,
     if (vxattr->flags & VXATTR_RSTAT) {
       flags |= CEPH_STAT_RSTAT;
     }
-    r = _getattr(in, flags, perms, true);
+    r = _getattr(in, flags | CEPH_STAT_CAP_XATTR, perms, true);
     if (r != 0) {
       // Error from getattr!
       return r;