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: v14.2.10~138^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=983a5010575611ce1ebfa4ba52d303d6894e8dac;p=ceph.git mds: add comment explaining unusual locking for MDSIOContextBase Signed-off-by: Patrick Donnelly (cherry picked from commit c2a079084c7653b6ed7e0912d4e737fe10a36836) --- diff --git a/src/mds/MDSContext.cc b/src/mds/MDSContext.cc index c09e8c3ab566..eecaa81e47e9 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()) {