]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
HashIndex: in cleanup, interpret missing dir as completed merge 1831/head 1835/head
authorSamuel Just <sam.just@inktank.com>
Fri, 16 May 2014 03:53:27 +0000 (20:53 -0700)
committerSamuel Just <sam.just@inktank.com>
Mon, 19 May 2014 21:24:37 +0000 (14:24 -0700)
If we stop between unlinking the empty subdir and removing the root
merge marker, we get ENOENT on the get_info.  That's actually fine.

Backport: firefly
Fixes: 8332
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/os/HashIndex.cc

index d556cbc766139e3b2942b739dc01c59c82c9d267..35cb49bbe0013c1407d06623211b8dbd007741c2 100644 (file)
@@ -36,8 +36,12 @@ int HashIndex::cleanup() {
   InProgressOp in_progress(i);
   subdir_info_s info;
   r = get_info(in_progress.path, &info);
-  if (r < 0)
+  if (r == -ENOENT) {
+    return end_split_or_merge(in_progress.path);
+  } else if (r < 0) {
     return r;
+  }
+
   if (in_progress.is_split())
     return complete_split(in_progress.path, info);
   else if (in_progress.is_merge())