From: Alex Markuze <amarkuze@redhat.com>
To: Kaho Jiang <kj2864@nyu.edu>
Cc: Ilya Dryomov <idryomov@gmail.com>, Xiubo Li <xiubo.li@clyso.com>,
Viacheslav Dubeyko <slava@dubeyko.com>,
ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org, co+408fcc361565713f@bugs.sh
Subject: Re: [PATCH v5 2/2] ceph: defer the blocklist and fence off the MDS worker
Date: Wed, 2 Dec 2026 15:13:43 +0000 [thread overview]
Message-ID: <20261202151343.640309-1-amarkuze@redhat.com> (raw)
In-Reply-To: <20261202045041.130195-2-kj2864@nyu.edu>
Hi Kaho,
Thanks for splitting the bounds fix and moving the fence work off the MDS
worker. The deferred path still needs to keep the client fenced while it
handles the error and the blocklist operation.
On kernels where i_state is a struct inode_state_flags, the new I_NEW test
does not compile; inode_state_read_once() is the accessor used in this
tree. On a snap-trace failure, discard_new_inode() consumes the target
reference but leaves r_target_inode pointing to it. It also wakes waiters
while the incomplete inode is still hashed. iget_failed() marks the inode
bad, unhashes it before waking waiters, and puts it; it is a candidate for
a target still being initialized. The request's reference needs to be
detached safely, with the create, async-create and unsafe-request paths
retaining the references they need.
A direct writer can pass the shutdown check and wait for snap_rwsem while
the snap update fails. In try_get_cap_refs(), rechecking the fence after
taking snap_rwsem and before taking the cached context would stop that
waiter, provided mount and recovery cannot clear the fence. That check
alone does not cover writers that already have a context or queued I/O.
For a wider local gate, ceph_osdc_abort_requests() fails ordinary OSD
submissions after its abort latch is installed. Its placement in the
failure paths needs a lock-order check, and a writer can still enqueue
while the abort is waiting for the OSD-client lock. A wider gate needs
an ordering shared with submission and resend paths. The abort cannot
retract a write that has already reached an OSD.
One direction for mount and recovery is to keep the corruption state
sticky for the lifetime of the client, separate from whether fence work
is queued or running. A matching mount or an already-started clean
recovery must not make the corrupted client usable again. Coordinate
recovery with the worker so a nonce reset cannot make it blocklist a
replacement identity.
The monitor wait needs a bound on the version request as well as the map
wait: ceph_wait_for_latest_osdmap() calls ceph_monc_get_version() before
waiting for the map, and this call uses a zero map timeout.
wait_generic_request_timeout() may be useful for a bounded version-request
variant, with cancellation and late replies handled. Separating local MDS
request wakeups from the remote wait would let local cleanup progress;
sent and unsafe requests still need their completion and ownership rules.
Moving the whole ceph_mdsc_force_umount() earlier also requests session
closes and does not retract writes already sent to OSDs. A denied or timed-out
blocklist is not confirmation that the OSDs exclude those writes.
For testing, fail snap-trace allocation after allocating a new target
inode, with a concurrent I_NEW waiter, and check the inode's lifetime and
what the waiter receives. Pause a direct writer at snap_rwsem while failing
a snap-array allocation and check that it cannot submit the old context.
With a client allowed to blocklist, let the command succeed and then
withhold the version reply to check request and unmount progress.
Thanks,
Alex
next prev parent reply other threads:[~2026-12-02 15:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 4:50 [PATCH v5 1/2] ceph: Use unsigned types for snapshot split counts Kaho Jiang
2026-12-02 4:50 ` [PATCH v5 2/2] ceph: defer the blocklist and fence off the MDS worker Kaho Jiang
2026-12-02 15:13 ` Alex Markuze [this message]
2026-12-02 15:30 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261202151343.640309-1-amarkuze@redhat.com \
--to=amarkuze@redhat.com \
--cc=ceph-devel@vger.kernel.org \
--cc=co+408fcc361565713f@bugs.sh \
--cc=idryomov@gmail.com \
--cc=kj2864@nyu.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=slava@dubeyko.com \
--cc=stable@vger.kernel.org \
--cc=xiubo.li@clyso.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®