]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
HashIndex: in cleanup, interpret missing dir as completed merge
authorSamuel Just <sam.just@inktank.com>
Fri, 16 May 2014 03:53:27 +0000 (20:53 -0700)
committerSamuel Just <sam.just@inktank.com>
Fri, 30 May 2014 20:32:10 +0000 (13:32 -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>
(cherry picked from commit 5ff95dbdd2dbb533d344f37fea722ca4f140e670)

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())