From: John Spray Date: Mon, 16 Feb 2015 17:06:45 +0000 (+0000) Subject: mds: wait for mydir replicas to go away in stopping X-Git-Tag: suse_latest~24^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=52772ef4edc42163603e1182ca744baf36e19339;p=ceph.git mds: wait for mydir replicas to go away in stopping Previously, while we were waiting for locks related to mydir to be acknowledged by other ranks, we could advance to the point of capping the log. When the locks were acked, we would try to write to the log and assert out. Avoid this by waiting for mydir to not be replicated before capping the log. Fixes: #10743 Signed-off-by: John Spray --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index f62afae4e4ab..f1607465c212 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -7191,6 +7191,14 @@ bool MDCache::shutdown_pass() } assert(subtrees.empty()); + // Still replicas of mydir? + if (mydir->inode->is_replicated()) { + // We do this because otherwise acks to locks could come in after + // we cap the log. + dout(7) << "waiting for mydir replicas to release: " << *mydir << dendl; + return false; + } + // (only do this once!) if (!mds->mdlog->is_capped()) { dout(7) << "capping the log" << dendl;