]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: Handle ENODATA returned from getxattr
authorSam Lang <sam.lang@inktank.com>
Mon, 18 Mar 2013 21:59:04 +0000 (16:59 -0500)
committerSage Weil <sage@inktank.com>
Tue, 19 Mar 2013 04:07:51 +0000 (21:07 -0700)
The osds might return ENODATA if we request an
xattr that doesn't exist.  In this case, we're
requesting the 'parent' xattr so that we can
remove all the forwarding pointers, but the xattr
may not have been written (which only happens on
log segment trim), so we don't assert here.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
src/mds/MDCache.cc

index 43cf4b0d9bf1c406aca3f1db0c7d7c28a5079805..9da9dab010a1f0b9cb4b27d2b16b692e7bff7cbc 100644 (file)
@@ -8449,7 +8449,7 @@ public:
 
 void MDCache::_purge_forwarding_pointers(inode_backtrace_t *backtrace, CDentry *d, int r, Context *fin)
 {
-  assert(r == 0 || r == -ENOENT);
+  assert(r == 0 || r == -ENOENT || r == -ENODATA);
   // setup gathering context
   C_GatherBuilder gather_bld(g_ceph_context);