From: Patrick Donnelly Date: Wed, 27 Mar 2024 16:04:57 +0000 (-0400) Subject: mds: attach quiesce_path mdr to finisher at creation not dispatch X-Git-Tag: v20.0.0~2242^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=612b0957ee4eeda4f3b17ca5c3c2ca2346e8ec3d;p=ceph.git mds: attach quiesce_path mdr to finisher at creation not dispatch No functional difference but this is cleaner. Signed-off-by: Patrick Donnelly --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 127721f085bbc..e46e931459b89 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -13761,6 +13761,7 @@ void MDCache::dispatch_quiesce_path(const MDRequestRef& mdr) dout(5) << __func__ << ": dispatching" << 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"); @@ -13791,8 +13792,6 @@ void MDCache::dispatch_quiesce_path(const MDRequestRef& mdr) return; } - qfinisher->mdr = mdr; - { int myrc = 0; for (auto& [qimdr, rc] : qs.get_failed()) { @@ -13842,6 +13841,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) {