From 9029b0915b490faa257c8ea26f76c3edd148b0b4 Mon Sep 17 00:00:00 2001 From: Sam Lang Date: Mon, 18 Mar 2013 16:59:04 -0500 Subject: [PATCH] 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 Reviewed-by: Sage Weil --- src/mds/MDCache.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);