From: Viacheslav Dubeyko <vdubeyko@redhat.com>
To: Alex Markuze <amarkuze@redhat.com>
Cc: ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org,
idryomov@gmail.com
Subject: Re: [EXTERNAL] [PATCH v3 05/11] ceph: add client reset state machine and session teardown
Date: Wed, 06 May 2026 14:29:33 -0700 [thread overview]
Message-ID: <979770752db43066a74249f237a2a4d66b7c11e8.camel@redhat.com> (raw)
In-Reply-To: <CAO8a2SgcoFjAn_YuXHLc9rtA49xoz-4EvTLC_9skkEZ82BeuOQ@mail.gmail.com>
On Wed, 2026-05-06 at 14:39 +0300, Alex Markuze wrote:
> Hi Slava,
>
> Thanks for the thorough review, several good points here.
>
> -EIO mapping for blocked callers
>
> The design intent is that internal work-function errors e.g.,
> -ENOMEM from kcalloc, or a transient encoding failure, should not leak
> to unrelated callers such as open() or flock(). These callers did not
> trigger the reset and have no way to
> act on "reset ran out of memory." The detailed error is preserved in
> debugfs status and tracepoints for the operator who triggered the
> reset.
>
> That said, I agree that -EIO is broad. The challenge is: what would
> be more useful to the caller? The caller's only real action is "retry
> later" regardless of whether the reset failed due to -ENOMEM or
> -ETIMEDOUT internally. If you have a
> specific error code in mind that would be more informative without
> leaking internal details, I'm open to it.
>
It's hard to advise something useful here. But if the caller's only real action
is "retry later", then, maybe, -EAGAIN could be used here?
> msleep() for close grace period
>
> I share your discomfort with msleep() in kernel code. The difficulty
> is that there is no completion event for "the REQUEST_CLOSE message
> has been transmitted on the wire." The messenger queues the message
> and returns immediately.
> The grace period is purely best-effort. The MDS uses
> session_autoclose as a fallback if it never receives the close.
>
> What event would you suggest waiting on here? One option is to wait
> for the session state to transition; the MDS sends a SESSION_CLOSE
> response, but that reintroduces the stalemate problem.
> If the MDS is stuck, we'd wait forever for something that will never
> come, which is exactly what the reset is trying to break. I'm open to
> alternatives if you have a pattern in mind.
I see the point. Yes, it's complicated of suggesting something more useful from
my side.
>
> out_sessions skipping ceph_mdsc_reset_complete()
>
> Yes, this is intentional. The out_sessions path is reached only when
> st->shutdown is true, meaning ceph_mdsc_destroy() has already taken
> ownership of the final state transition. destroy() sets phase to IDLE,
> sets last_errno to -ESHUTDOWN,
> and wakes blocked waiters itself. If the work function also called
> reset_complete(), it would race with destroy() and potentially
> overwrite the shutdown state. The comment on the shutdown check tries
> to explain this but perhaps it could be
> clearer. Would adding a comment at the out_sessions label help?
>
I am slightly lost the context here. :) But, I believe that adding the comment
could makes the situation better.
Thanks,
Slava.
next prev parent reply other threads:[~2026-05-06 21:29 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-29 12:51 [PATCH v3 00/11] ceph: manual client session reset Alex Markuze
2026-04-29 12:51 ` [PATCH v3 01/11] ceph: convert inode flags to named bit positions and atomic bitops Alex Markuze
2026-04-29 19:31 ` [EXTERNAL] " Viacheslav Dubeyko
2026-04-29 12:51 ` [PATCH v3 02/11] ceph: use proper endian conversion for flock_len in reconnect Alex Markuze
2026-04-29 12:51 ` [PATCH v3 03/11] ceph: harden send_mds_reconnect and handle active-MDS peer reset Alex Markuze
2026-04-29 21:22 ` [EXTERNAL] " Viacheslav Dubeyko
2026-05-06 11:32 ` Alex Markuze
2026-04-29 12:51 ` [PATCH v3 04/11] ceph: add diagnostic timeout loop to wait_caps_flush() Alex Markuze
2026-04-29 21:41 ` [EXTERNAL] " Viacheslav Dubeyko
2026-05-06 11:34 ` Alex Markuze
2026-05-06 21:18 ` Viacheslav Dubeyko
2026-04-29 12:52 ` [PATCH v3 05/11] ceph: add client reset state machine and session teardown Alex Markuze
2026-04-29 22:29 ` [EXTERNAL] " Viacheslav Dubeyko
2026-05-06 11:39 ` Alex Markuze
2026-05-06 21:29 ` Viacheslav Dubeyko [this message]
2026-04-29 12:52 ` [PATCH v3 06/11] ceph: add manual reset debugfs control and tracepoints Alex Markuze
2026-04-30 18:38 ` [EXTERNAL] " Viacheslav Dubeyko
2026-04-29 12:52 ` [PATCH v3 07/11] selftests: ceph: add reset consistency checker Alex Markuze
2026-04-29 12:52 ` [PATCH v3 08/11] selftests: ceph: add reset stress test Alex Markuze
2026-04-29 12:52 ` [PATCH v3 09/11] selftests: ceph: add reset corner-case tests Alex Markuze
2026-04-29 12:52 ` [PATCH v3 10/11] selftests: ceph: add validation harness Alex Markuze
2026-04-29 12:52 ` [PATCH v3 11/11] selftests: ceph: wire up Ceph reset kselftests and documentation Alex Markuze
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=979770752db43066a74249f237a2a4d66b7c11e8.camel@redhat.com \
--to=vdubeyko@redhat.com \
--cc=amarkuze@redhat.com \
--cc=ceph-devel@vger.kernel.org \
--cc=idryomov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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®