summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Lang <sam.lang@inktank.com>2013-03-18 16:59:04 -0500
committerSage Weil <sage@inktank.com>2013-03-18 21:07:51 -0700
commit9029b0915b490faa257c8ea26f76c3edd148b0b4 (patch)
tree40a54a83581ef7c7e1db2bbd140fb14c53282fee
parent6774290ea0608111119449ce722c4eb4359cc872 (diff)
downloadceph-9029b0915b490faa257c8ea26f76c3edd148b0b4.tar.gz
mds: Handle ENODATA returned from getxattr
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>
-rw-r--r--src/mds/MDCache.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc
index 43cf4b0d9bf..9da9dab010a 100644
--- a/src/mds/MDCache.cc
+++ b/src/mds/MDCache.cc
@@ -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);