Linux-CIFS Archive mirror
 help / color / mirror / Atom feed
From: Steve French <smfrench@gmail.com>
To: Stefan Metzmacher <metze@samba.org>
Cc: linux-cifs@vger.kernel.org, samba-technical@lists.samba.org,
	 Tom Talpey <tom@talpey.com>, Long Li <longli@microsoft.com>,
	 Namjae Jeon <linkinjeon@kernel.org>
Subject: Re: [PATCH] smb: client: let smbd_destroy() wait for SMBDIRECT_SOCKET_DISCONNECTED
Date: Wed, 15 Oct 2025 11:24:23 -0500	[thread overview]
Message-ID: <CAH2r5msUtZHp0jNWM142zyFvrqp+tLPyXR=bz+hCam_3HB5iQw@mail.gmail.com> (raw)
In-Reply-To: <20251015150504.1109560-1-metze@samba.org>

merged into cifs-2.6.git for-next pending more review and testing

On Wed, Oct 15, 2025 at 10:05 AM Stefan Metzmacher <metze@samba.org> wrote:
>
> We should wait for the rdma_cm to become SMBDIRECT_SOCKET_DISCONNECTED,
> it turns out that (at least running some xfstests e.g. cifs/001)
> often triggers the case where wait_event_interruptible() returns
> with -ERESTARTSYS instead of waiting for SMBDIRECT_SOCKET_DISCONNECTED
> to be reached.
>
> Or we are already in SMBDIRECT_SOCKET_DISCONNECTING and never wait
> for SMBDIRECT_SOCKET_DISCONNECTED.
>
> Fixes: 050b8c374019 ("smbd: Make upper layer decide when to destroy the transport")
> Fixes: e8b3bfe9bc65 ("cifs: smbd: Don't destroy transport on RDMA disconnect")
> Fixes: b0aa92a229ab ("smb: client: make sure smbd_disconnect_rdma_work() doesn't run after smbd_destroy() took over")
> Cc: Steve French <smfrench@gmail.com>
> Cc: Tom Talpey <tom@talpey.com>
> Cc: Long Li <longli@microsoft.com>
> Cc: Namjae Jeon <linkinjeon@kernel.org>
> Cc: linux-cifs@vger.kernel.org
> Cc: samba-technical@lists.samba.org
> Signed-off-by: Stefan Metzmacher <metze@samba.org>
> ---
>  fs/smb/client/smbdirect.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/fs/smb/client/smbdirect.c b/fs/smb/client/smbdirect.c
> index 77de85d7cdc3..49e2df3ad1f0 100644
> --- a/fs/smb/client/smbdirect.c
> +++ b/fs/smb/client/smbdirect.c
> @@ -1575,12 +1575,12 @@ void smbd_destroy(struct TCP_Server_Info *server)
>         disable_work_sync(&sc->disconnect_work);
>
>         log_rdma_event(INFO, "destroying rdma session\n");
> -       if (sc->status < SMBDIRECT_SOCKET_DISCONNECTING) {
> +       if (sc->status < SMBDIRECT_SOCKET_DISCONNECTING)
>                 smbd_disconnect_rdma_work(&sc->disconnect_work);
> +       if (sc->status < SMBDIRECT_SOCKET_DISCONNECTED) {
>                 log_rdma_event(INFO, "wait for transport being disconnected\n");
> -               wait_event_interruptible(
> -                       sc->status_wait,
> -                       sc->status == SMBDIRECT_SOCKET_DISCONNECTED);
> +               wait_event(sc->status_wait, sc->status == SMBDIRECT_SOCKET_DISCONNECTED);
> +               log_rdma_event(INFO, "waited for transport being disconnected\n");
>         }
>
>         /*
> --
> 2.43.0
>


-- 
Thanks,

Steve

      reply	other threads:[~2025-10-15 16:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-15 15:05 [PATCH] smb: client: let smbd_destroy() wait for SMBDIRECT_SOCKET_DISCONNECTED Stefan Metzmacher
2025-10-15 16:24 ` Steve French [this message]

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='CAH2r5msUtZHp0jNWM142zyFvrqp+tLPyXR=bz+hCam_3HB5iQw@mail.gmail.com' \
    --to=smfrench@gmail.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=longli@microsoft.com \
    --cc=metze@samba.org \
    --cc=samba-technical@lists.samba.org \
    --cc=tom@talpey.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).