From: Samuel Just Date: Wed, 24 Apr 2013 21:23:45 +0000 (-0700) Subject: FileStore::_split_collection: src or dest may be removed on replay X-Git-Tag: v0.61~103 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=14f2392263c5a9d5645cdd9e3c879f009a40466d;p=ceph.git FileStore::_split_collection: src or dest may be removed on replay If the collection is subsequently removed, the _split_collection might get replayed and find either src or dest removed. Fixes: #4806 Backport: bobtail Signed-off-by: Samuel Just Reviewed-by: Sage Weil --- diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index bc758b8591b2..484d074be8b9 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -4786,6 +4786,17 @@ int FileStore::_split_collection(coll_t cid, int r; { dout(15) << __func__ << " " << cid << " bits: " << bits << dendl; + if (!collection_exists(cid)) { + dout(2) << __func__ << ": " << cid << " DNE" << dendl; + assert(replaying); + return 0; + } + if (!collection_exists(dest)) { + dout(2) << __func__ << ": " << dest << " DNE" << dendl; + assert(replaying); + return 0; + } + int dstcmp = _check_replay_guard(dest, spos); if (dstcmp < 0) return 0;