From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796199901; b=VpW34Ag/LRlmLPWDBeYz3mRHMfbWGSZ7yfpJIG5Xhfef2eG5rhlCVb3DhB7KM6HlhCvS CqqsEhtsnB/r84lAHRuZu9GZI3HVjHfqHfsuIpPf4TtCAAxGsNeLnsUizcwstMzixxVc8 k0Bz0NOUXJ3kT4ZCBLuCACnStcfL7JV+O1q7XSh+zUqRBTLOWagwYpRKXuizIx4KdJhSE ed8Qh6J4HydV9ubwndzD4dzJHxWyYr/n5A35VS68h7zV26BCILoZg1A7vde6xxFcTL64r 4d9bcMetbaPTemflzaOG+VWx5TGVUKWDaSWHunVxjXx7fG8gXwcLXrxMHDA6fx3fPrg== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796199901; h=Received:DKIM-Signature:Received:From:Subject:Date:Message-Id: MIME-Version:Content-Type:Content-Transfer-Encoding:X-B4-Tracking: X-Change-ID:To:Cc:X-Mailer:X-Developer-Signature:X-Developer-Key: X-Endpoint-Received:X-Original-From:Reply-To; bh=aUkkHn3HHUVSh1gcq5RjY1RmB349RSuB4xY7Zd5sR4E=; b=OfKMmRiJjMgwHtiPg0snsRcf016GyuPpE5Jr36bjSoxMoBJbGefqDUxahbdqy1OR6V+3 9ER5x55tdkgRYiYBCBpKpe+03bwwa2e4UGog/ALHC4zcW2PgJJl8xaIx78e85/UxpWTcL l4ov9NtwBRrmsWTGiLeExn4thpaAWU21XiZzd4jf89w+Kygx4Pue8lmTj3IBtA9sAUfXI OIYQQrXtRb5MNq2nqbZssoRJuBQ2sAy47BUa30hcpq0On6iBxx+s6QmwwEqrjQgqgXWfU ATxpt2VNnNy1UNEcTN7Mo9Y92/+nkNPABpi/Frsi7M/1fpgWXnCrWuW+J1tW4W5BgQg== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=jWcQ8ThE; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E808E606A332; Wed, 2 Dec 2026 08:25:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=jWcQ8ThE Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1796199900; b=cNkMet8JaHaNhTgkFT6TAq2bIPDGWr4Tie/RV3NAacqgEQJwYJT2xOjQ9dapX6IZ0VvP w5HBfM1y3Byqj485czarXAEVB0JNbFKzpSxedMHOF3Y6KoyKwSNnh3eouAOStjUrz0GFf o7TM72JKBnOY03JBo/r5i7Kdw3qqEo8KD0Th9obrP7pBL1Y3Quvfe3RfIbrIoZ5DJYL+W 1n+C01K3YdLqOAYlEd0c3FyIwO9e2V/wqgdZn1m0LGa8thPPs43n14PO6rtvJ8TRLQ9Ad 8Rl7V9grxveWto6cznUhyhO3niadx5suGUmVigmmYN1pvrwdoOIpy0a6EimwniMIdSQ== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1796199900; h=DKIM-Signature:Received:From:Subject:Date:Message-Id:MIME-Version: Content-Type:Content-Transfer-Encoding:X-B4-Tracking:X-Change-ID:To: Cc:X-Mailer:X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To; bh=aUkkHn3HHUVSh1gcq5RjY1RmB349RSuB4xY7Zd5sR4E=; b=eL9jhRdvQcbtVB7kSQbSFgV4logi6AiYsaCiQ7HRXemafvzF/XziVK+KGzemiZ+Kkzl6 6VXVmsjditNk5FzJ4Ol4oxeuLVyxcn/KeZM0Zhx1NzUKmMqbJ7CUAkQJW7zZ1ANd+v/lK XeIssdi/LITfPK+8NnmwVw7lW3ew2CNgKpRut1ccdEEureFvQkOKqT/Bvmyoaxz1DHmdf nAMtczYm6PeRF4WnWimAWVmrnzdYBITP3Aq1E6/neEqX9cHV1HfuPvKIcAcUUYyz+kUIU EbCesdMHisltN8KXJa3eAZZ1kN+x6w0mi277htBJDt1Ty4HJAb/sdj1duWGsL4mWHUg== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id BEFED1F00896; Wed, 2 Dec 2026 08:24:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796199900; bh=aUkkHn3HHUVSh1gcq5RjY1RmB349RSuB4xY7Zd5sR4E=; h=From:Subject:Date:To:Cc:Reply-To; b=jWcQ8ThEzxJv7NK+6dSQTP2svkQEy7jGEimtNHRNhQtHn5hl/MwJSXfEiJLfRgYwc MIJ53Fo9jFJy/QI3NkaOp9Grw9MY+o1d1F7+bLrg6MivoUDGmZLH6Vfcy9hiOErT50 ZVu7J3DILjUhSfh+LpRt5gHt0ug+WtY+dUL1uFRCMftd+XWNrUHyd06dcu8XitUhcF 6KSS4EqXN77dSRAhBWBlLedz26ZAeGW7Ug2wOg6aYbVMZFOshaD4097zYYEN8mbQ0v tn16Q2Xafs4B6h0ODcdLKXW6kpQ6V0WyuaavSmO84OghwGVrP4vQqmPWS1UiAi9j8B 29Dp9u2ntNneQ== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 1BAC84F301; Wed, 2 Dec 2026 08:24:49 +0000 (UTC) From: Xiubo Li via B4 Relay Subject: [PATCH v9 0/5] ceph: reduce mdsc->mutex contention in the cephfs kclient Date: Wed, 02 Dec 2026 09:24:41 +0100 Message-Id: <20261202-ceph-mdsc-mutex-optimization-v9-0-f7719b7c4f57@clyso.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-B4-Tracking: v=1; b=H4sIAAAAAAAC/43Ny07DMBQE0F+pvMbI1293xX8gFn7cUCPSVHEat VT9d5wiQdQuzHKkmTMXUnDMWMh2cyEjzrnkYV+De9qQuPP7d6Q51Uw445oZEDTiYUf7VCLtjxO e6HCYcp+//FSH1KCRPugQog2kEocRu3y68a9vP7kcwwfGaTGXxi6XaRjPt/8Zlt4/r2agjDqPy kcQKgr5Ej/PZXiOQ0+Wq5mvMdXA+IIxtBAM14Y/YOIPswANTFQsMQEAUoLrHjC5xngDkxXrohf BSM0794CpNWYbmKqYSUIoLzwkFu4xvcK4a2C6YlJrJ3SMIbl0j5lfDICzBmYq5iUiGoaMCXuP2 TWmG5itmAqBc+ewq+gau16v36SrSM71AgAA X-Change-ID: 20260713-ceph-mdsc-mutex-optimization-7e74ab6bbc8b To: Ilya Dryomov , Alex Markuze , Viacheslav Dubeyko Cc: ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org, Xiubo Li X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1796199886; l=16182; i=xiubo.li@clyso.com; s=20260625; h=from:subject:message-id; bh=hqUcUAE2bubH49kKWt5wG6rBJPNJkeRgi3qf1fFeOuo=; b=vyuhWbxlQP+4jvGuLWFiCjHNTyYK7Fx6MMWIctwHRbjTCwX1mKoQ9Jw2E9aNVdM5fFzwcUMZ6 QooxzeAbbK6DzWas42p408sL6GaPg0Vd0vNP/7dVct3i5OaWJIbFq/Y X-Developer-Key: i=xiubo.li@clyso.com; a=ed25519; pk=V3NGr0AgAopiUhaLY51ipBkLN5LlcLhjOEfLEq1RoZ8= X-Endpoint-Received: by B4 Relay for xiubo.li@clyso.com/20260625 with auth_id=840 X-Original-From: Xiubo Li Reply-To: xiubo.li@clyso.com This series reduces mdsc->mutex hold times from hundreds of microseconds to tens of microseconds on the hot request-submit and reply-handling paths. The approach is incremental: 1. Access oldest_tid with READ_ONCE()/WRITE_ONCE() so that __prepare_send_request() and __send_request() no longer need the mutex. 2. Replace the request_tree rbtree with an xarray for cheaper lookups and simpler iteration. 3. Add a dedicated wait_list_lock spinlock so wait-list operations no longer depend on the global mutex. 4. Move mdsc->mutex acquisition inside __do_request(), then release it during the send phase (message construction and path walking), leaving only the brief setup/teardown under the lock. 5. Narrow the mutex scope in replay_unsafe_requests() similarly. Tested with concurrent readdir + stat on a 5000-file directory (32 threads). bpftrace measurements show: before after __do_request 354-2327 us 10-68 us (34x) handle_reply 51-416 us 10-32 us (13x) submit_request 89-211 us 10-41 us (5x) Benchmark results from test_i_caps (aggregate cache test): | Test | Before | After | Improvement | |---------------------|----------|----------|-------------| | stat storm ST | 692k/s | 1,420k/s | +105% (2.1x)| | stat storm MT | 722k/s | 1,373k/s | +90% (1.9x)| | open/close | 403k/s | 524k/s | +30% | | stat hot (cache) | 353k/s | 540k/s | +53% | | readdir | 877/s | 832/s | ~0% | | Total time | 195s | 121s | -38% (1.6x)| The 2x stat throughput gain comes from __do_request() no longer holding mdsc->mutex during the __send_request() phase, so dentry path walking and message encoding in create_request_message() run outside the lock. No functional changes intended. Testing for 24+ hours: The runtime validation ran on a vstart cluster (3 active + 3 standby MDS) with a 32-thread metadata load generator and a kernel built with CONFIG_PROVE_LOCKING, CONFIG_DEBUG_LIST and CONFIG_DETECT_HUNG_TASK: - fsstress + dbench smoke runs: clean. - r1, single-MDS failover churn: 108 failovers across 4 runs, every session reconnected, no lost wakeups, no hangs. - r2, double "ceph mds fail" chaos: ~90 double-fail cycles across 2 runs, zero hangs, zero kernel warnings, clean teardown. - r3, double-fail plus victim processes SIGKILLed every 50-400 ms (5084 kills in one run) to exercise the request abort path: zero warnings, zero list-corruption reports, zero refcount issues. - r4 (double mds fail + evict churn + 8 victim processes killed at 200-2000 ms): one 32-minute run FAILED -- a worker was stuck in truncate for ~15 minutes at shutdown, the join oracle's first hit across all runs. Live-kernel forensics (drgn against /proc/kcore) showed the wedge is unrelated to this series: the double-fail had dropped the inode's dirty caps in the session-loss path (caps.c) without cleaning up the page wrbuffer refs, so the ceph_inode_work() kworker spun forever in __ceph_do_pending_vmtruncate()'s flush branch -- with no dirty caps, ceph_writepages_start() returns -ENODATA without writing, the refs never drain, and the loop holds i_truncate_mutex indefinitely, starving concurrent truncates (and, via setattr's inode lock and vfs_unlink()'s target-inode lock, unlinks). Every link of that chain is in caps.c/inode.c/addr.c/VFS code untouched by these patches; it is a pre-existing consistency bug (dirty caps dropped without wrbuffer-ref cleanup on session loss, plus an unbounded flush loop) to be fixed separately. (The r4 evict trigger was skipped in this run as debugfs was not mounted; session eviction itself had been exercised in earlier testing.) No lockdep reports, list corruption, refcount warnings, or hung tasks across the whole campaign. The campaign also exposed two pre-existing mainline bugs (a NULL oldest-snapc dereference in the writeback path and a request abort-path use-after-free), both reproducible without this series on a vanilla 7.2 kernel and fixed separately. The whole test code could be find in: https://tracker.ceph.com/issues/80086 Or https://tracker.ceph.com/issues/80084 Signed-off-by: Xiubo Li --- Changes in v9: - Rebase onto the current testing branch. mds_peer_reset() there no longer tears the session down, so its hunk is gone from patch 4, and CEPH_MDS_R_DISPATCHING/CEPH_MDS_R_RESEND move to bits 11 and 12 after the new CEPH_MDS_R_LOOKUP_HANDOFF. - patch 1: find the next oldest_tid before publishing it, with a single WRITE_ONCE(), so a lockless reader never sees the transient 0 that the MDS takes as "trim all completed requests". (Alex Markuze) - patch 2: the same in the xarray version. - patch 4: take the mdsmap epoch under mdsc->mutex. __do_request() saves it in the new r_send_mdsmap_epoch for create_request_message(), and ceph_mdsc_handle_mdsmap() for ceph_monc_got_map(); a new map could free mdsc->mdsmap while it was read. (Alex Markuze) - patch 5: - Claim CEPH_MDS_R_DISPATCHING where the dispatch is decided, under mdsc->mutex: in ceph_mdsc_submit_request() when the request is registered, and in handle_forward(), kick_requests() and __wake_requests() through the new claim_dispatch(). The ownership is handed over to __do_request(), which no longer claims it. A context that finds it held only sets CEPH_MDS_R_RESEND. A delayed forward handler could otherwise send the request again after the owner had consumed RESEND, even after a safe reply had unregistered it, and a delayed kick could send a request that had been parked again, with r_wait still linked. (Alex Markuze) - __do_request() drops stale work under mdsc->mutex: a request that is no longer registered, or whose r_attempts nobody has zeroed. - __do_request() and replay_unsafe_requests() unlink r_wait before the send. (Alex Markuze) - An owner that consumes RESEND, in __do_request() or after a replay send, keeps the ownership for the re-dispatch instead of releasing and claiming it again. - patches 1 and 2: correct the commit messages. A stale oldest_tid only makes the MDS keep completed-request records longer, and the xarray lookups that take a reference still run under mdsc->mutex. - Link to v8: https://patch.msgid.link/20261126-ceph-mdsc-mutex-optimization-v8-0-5bb2299ef4ee@clyso.com Changes in v8: - Only patch 5/5 is changed; patches 1-4 are identical to v7. - patch 5: - Replace the CEPH_MDS_R_REPLAY_WAIT bit with the r_replay_waiters count, which only the waiters change. release_dispatch() cleared REPLAY_WAIT when it woke the waiter, so a waiter that had not gone to sleep yet when the owner consumed RESEND and claimed DISPATCHING again was never woken by the second release, and the reconnect hung with session->s_mutex held. (Alex Markuze) - Do not wait for CEPH_DENTRY_ASYNC_CREATE_BIT in the thread that submits an async create. A forward arriving during the first send makes that thread re-dispatch the request through the RESEND restart, and the bit is only cleared by ceph_finish_async_create(), which the same thread runs after ceph_mdsc_submit_request() returns. (Alex Markuze) - Link to v7: https://patch.msgid.link/20261120-ceph-mdsc-mutex-optimization-v7-0-a4eee70e0038@clyso.com Changes in v7: - Patches 1-3 are identical to v6. - patch 4: add the missing braces around the s_unsafe loop in replay_unsafe_requests(). Only r_attempts++ was inside the loop, and __send_request() ran once after it on a request pointer derived from the list head, so a reconnect with patch 4 alone replayed no unsafe request and touched a bogus pointer. Patch 5 rewrites the function, so the series result is unchanged; this keeps patch 4 bisectable. Found by -Wmisleading-indentation. - patch 5: - replay_unsafe_requests() no longer skips a request whose CEPH_MDS_R_DISPATCHING is held. The owner may already have queued the request message on the connection that send_mds_reconnect() resets, and nothing would send it again, so the caller waited forever. The replay now waits for the owner to release the bit, rescans, and replays the request itself. The owner never takes session->s_mutex in its send window, so the wait cannot deadlock. (Alex Markuze) - Add release_dispatch() and use it on every DISPATCHING release path. The replay flags its wait with the new CEPH_MDS_R_REPLAY_WAIT bit, and release_dispatch() calls wake_up_bit() only when that bit is set, so the common release stays one atomic clear plus a plain test_bit() under mdsc->mutex, without a lookup in the kernel-wide bit_wait_table. - __do_request() and replay_unsafe_requests() copy r_attempts and r_num_fwd into the new r_send_attempts and r_send_num_fwd under mdsc->mutex, and __prepare_send_request() encodes num_retry and num_fwd, and checks for retry overflow, from the copies. cleanup_session_requests() and handle_forward() may rewrite the originals while the message is built, which encoded num_retry as 255 and ext_num_retry as 0xffffffff. (Alex Markuze) - __do_request() resets r_resend_mds before dropping mdsc->mutex, so that a forward arriving in the send window is not undone. - Link to v6: https://patch.msgid.link/20260829-ceph-mdsc-mutex-optimization-v6-0-466936ccbd9d@clyso.com Changes in v6: - Only patch 5/5 is changed; patches 1-4 are identical to v5. - Replace the ad-hoc r_attempts dispatch gate with an explicit ownership protocol. __do_request() and replay_unsafe_requests() claim CEPH_MDS_R_DISPATCHING under mdsc->mutex before the unlocked prepare/send window and release it on exit, so only one context ever rebuilds and sends a request's message. A claim consumes any pending CEPH_MDS_R_RESEND. - cleanup_session_requests() and handle_forward() set CEPH_MDS_R_RESEND under mdsc->mutex when they see DISPATCHING held, instead of relying on r_attempts == 0 to trigger a resend. Fixes the v5 race where cleanup_session_requests() could zero r_attempts while a sender was between the mutex release and __send_request(), letting a second __do_request() in and double ceph_msg_put() the request message. - On release, the owner consumes a pending CEPH_MDS_R_RESEND and re-dispatches the request through __do_request() (restart label) as long as it is still registered in the request xarray. - __wake_requests() now takes mdsc->mutex and splices the wait list under it, pinning a reference on each request in the same critical section as the list_del_init(). This fixes the v5 lockless walk of the spliced list against concurrent list_del_init() by the park paths, and serializes the SESSION_OPEN wake in handle_session() against the park decision in __do_request(). - Collector exclusivity — kick_requests(), __wake_requests() and replay_unsafe_requests() skip any request whose r_aux_item is non-empty (checked under mdsc->mutex), so two concurrent collectors can no longer add the same node to their local lists. - The re-park paths in __do_request() now list_del_init() the request before list_add()ing it onto a wait list, so re-parking is idempotent (needed now that a request can re-enter __do_request() through the RESEND restart loop). - __do_request() refuses to dispatch GOT_UNSAFE requests, clearing any pending RESEND/DISPATCHING bits, so an unsafe request is never parked on a wait list. Together with the exclusivity predicate this guarantees a request is never both wait-listed and on session->s_unsafe, and replay_unsafe_requests() remains the only replayer of unsafe requests. - replay_unsafe_requests() claims DISPATCHING in both collect loops, and after __send_request() consumes a pending RESEND and re-dispatches through __do_request(). - send_mds_reconnect() drops snap_rwsem before calling __wake_requests(), which now takes mdsc->mutex internally (lock order). - Link to v5: https://patch.msgid.link/20260818-ceph-mdsc-mutex-optimization-v5-0-7d335a3a1d0b@clyso.com Changes in v5: - patch 4: add INIT_LIST_HEAD(&req->r_aux_item) in ceph_mdsc_create_request(). - patch 5: keep requests on session->s_unsafe during replay; use r_aux_item only as a walk list. - Link to v4: https://patch.msgid.link/20260812-ceph-mdsc-mutex-optimization-v4-0-fca3b7462f94@clyso.com Changes in v4: - Fix ref leak in __register_request() xa_store error path - Fix r_attempts data race: move r_attempts++ from __prepare_send_request() (lockless) into __do_request() and replay_unsafe_requests() under mdsc->mutex. Adjust the retry overflow check accordingly. - Fix kick_requests() list corruption: detach r_wait from the local kick_list before calling __do_request(). - Fix collect-then-replay list-node races in both kick_requests() and replay_unsafe_requests(): introduce r_aux_item, a dedicated list_head for temporary local list iteration, so that concurrent __unregister_request() cannot corrupt the iterator. - Link to v3: https://patch.msgid.link/20260811-ceph-mdsc-mutex-optimization-v3-0-d031114419f4@clyso.com Changes in v3: - Restrict CEPH_FS to 64BIT to prevent xarray index truncation of u64 transaction IDs on 32-bit platforms, instead of the previous #if BITS_PER_LONG guard. There are no 32-bit users. The survey: https://lore.kernel.org/ceph-devel/CAOJNxR+XiUxR1GNUgd8T18x2KH8kstWtpxwL-mwwE0i_qospJA@mail.gmail.com/T/#t - Fix two plain reads of oldest_tid in the writer paths to use READ_ONCE() for consistency with the lockless read side. - Replace the original replay_unsafe_requests() change with a proper collect-then-replay pattern: unsafe list entries and matching old xarray entries are gathered under the mutex with a reference taken, then replayed outside it. Taking a reference ensures a concurrent reply handler cannot free an entry out from under the local-list iterator. - Rewrite all commit messages as descriptive prose, focusing on the problem and the approach rather than enumerating modified functions. - Link to v2: https://patch.msgid.link/20260715-ceph-mdsc-mutex-optimization-v2-0-90e81b726724@clyso.com Changes in v2: - Add xa_store() error handling and bail out on failure in the submit path - Guard xarray conversion with BITS_PER_LONG==64, fall back to rbtree on 32-bit - Fix missing mutex_unlock on early-return path in __do_request() - Move mutex_unlock before __wake_requests() and kick_requests() calls to avoid recursive lock acquisition - Pin requests with ceph_mdsc_get_request() across lockless __send_request() in replay_unsafe_requests() to prevent use-after-free - Keep mdsc->mutex held on 32-bit for rb_first()/rb_next() iteration in replay_unsafe_requests() - Drop stale "called under mdsc->mutex" comment on __wake_requests() - Add benchmark results from test_i_caps (2.1x stat throughput improvement) - Link to v1: https://patch.msgid.link/20260713-ceph-mdsc-mutex-optimization-v1-0-9ae5ac135c34@clyso.com --- Xiubo Li (5): ceph: use READ_ONCE/WRITE_ONCE for oldest_tid ceph: replace the request_tree rbtree with an xarray keyed by r_tid ceph: add wait_list_lock for wait-list serialization ceph: move mdsc->mutex into __do_request() ceph: narrow mdsc->mutex scope in replay_unsafe_requests fs/ceph/Kconfig | 1 + fs/ceph/debugfs.c | 6 +- fs/ceph/mds_client.c | 772 +++++++++++++++++++++++++++++++++++++++++---------- fs/ceph/mds_client.h | 61 +++- 4 files changed, 689 insertions(+), 151 deletions(-) --- base-commit: 3f90412e989cb381d4bf96260468f5c7b2d08655 change-id: 20260713-ceph-mdsc-mutex-optimization-7e74ab6bbc8b Best regards, -- Xiubo Li