From: Patrick Donnelly Date: Tue, 25 Feb 2020 18:32:59 +0000 (-0800) Subject: mds: add comment explaining unusual locking for MDSIOContextBase X-Git-Tag: v15.1.1~163^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c2a079084c7653b6ed7e0912d4e737fe10a36836;p=ceph.git mds: add comment explaining unusual locking for MDSIOContextBase Signed-off-by: Patrick Donnelly --- diff --git a/src/mds/MDSContext.cc b/src/mds/MDSContext.cc index bec31daad6a4..34b15a4f08bf 100644 --- a/src/mds/MDSContext.cc +++ b/src/mds/MDSContext.cc @@ -90,6 +90,9 @@ void MDSIOContextBase::complete(int r) { dout(10) << "MDSIOContextBase::complete: " << typeid(*this).name() << dendl; ceph_assert(mds != NULL); + // Note, MDSIOContext is passed outside the MDS and, strangely, we grab the + // lock here when MDSContext::complete would otherwise assume the lock is + // already acquired. std::lock_guard l(mds->mds_lock); if (mds->is_daemon_stopping()) {