From 51398c86f6a8c1acccf58f464fef71bd8b7730ca Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Wed, 27 Mar 2024 12:04:57 -0400 Subject: [PATCH] squid: mds: attach quiesce_path mdr to finisher at creation not dispatch No functional difference but this is cleaner. Signed-off-by: Patrick Donnelly (cherry picked from commit 612b0957ee4eeda4f3b17ca5c3c2ca2346e8ec3d) --- src/mds/MDCache.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index c6266701eb4..78e1fd310d6 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -13841,6 +13841,7 @@ void MDCache::dispatch_quiesce_path(const MDRequestRef& mdr) dout(5) << __func__ << ": dispatching " << *mdr << dendl; C_MDS_QuiescePath* qfinisher = static_cast(mdr->internal_op_finish); + ceph_assert(qfinisher->mdr == mdr); auto& qs = *qfinisher->qs; auto delay = g_conf().get_val("mds_cache_quiesce_delay"); auto splitauth = g_conf().get_val("mds_cache_quiesce_splitauth"); @@ -13870,8 +13871,6 @@ void MDCache::dispatch_quiesce_path(const MDRequestRef& mdr) auto rootino = rooti->ino(); - qfinisher->mdr = mdr; - { int myrc = 0; for (auto& [qimdr, rc] : qs.get_failed()) { @@ -13922,6 +13921,7 @@ MDRequestRef MDCache::quiesce_path(filepath p, C_MDS_QuiescePath* c, Formatter * MDRequestRef mdr = request_start_internal(CEPH_MDS_OP_QUIESCE_PATH); mdr->set_filepath(p); mdr->internal_op_finish = c; + c->mdr = mdr; if (delay > 0ms) { mds->timer.add_event_after(delay, new LambdaContext([cache=this,mdr=mdr](int r) { -- 2.39.5