From: Samuel Just Date: Fri, 16 May 2014 03:53:27 +0000 (-0700) Subject: HashIndex: in cleanup, interpret missing dir as completed merge X-Git-Tag: v0.82~58^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1831%2Fhead;p=ceph.git HashIndex: in cleanup, interpret missing dir as completed merge 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 --- diff --git a/src/os/HashIndex.cc b/src/os/HashIndex.cc index d556cbc76613..35cb49bbe001 100644 --- a/src/os/HashIndex.cc +++ b/src/os/HashIndex.cc @@ -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())