]> 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)
committerVicente Cheng <freeze.bilsted@gmail.com>
Thu, 16 Apr 2020 06:07:21 +0000 (06:07 +0000)
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit c2a079084c7653b6ed7e0912d4e737fe10a36836)

src/mds/MDSContext.cc

index c09e8c3ab5666455775e567fd2c1608a0b625a54..eecaa81e47e9c782c654d67a4830853fd3bd105e 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()) {