]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: add comment explaining unusual locking for MDSIOContextBase
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 25 Feb 2020 18:32:59 +0000 (10:32 -0800)
committerPatrick Donnelly <pdonnell@redhat.com>
Tue, 25 Feb 2020 18:33:57 +0000 (10:33 -0800)
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/mds/MDSContext.cc

index bec31daad6a43c03134cad7b33c7e0f75947b193..34b15a4f08bf96ccdc38318d783c688a6f15dee1 100644 (file)
@@ -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()) {