From: Enzo Matsumiya <ematsumiya@suse.de>
To: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org, pc@manguebit.org,
ronniesahlberg@gmail.com, sprasad@microsoft.com, tom@talpey.com,
bharathsm@microsoft.com, henrique.carvalho@suse.com
Subject: Re: [PATCH v2 1/2] smb: client: fast fail sends if need to reconnect
Date: Tue, 29 Sep 2026 09:25:14 -0300 [thread overview]
Message-ID: <arur-tfIfGJAVjWK@suse.de> (raw)
In-Reply-To: <CAKYAXd9oL+fGZopR7+yx4Pin4eJKCbYW=ZXpdNSXMSjzw_JRiA@mail.gmail.com>
On 09/29, Namjae Jeon wrote:
>> @@ -184,6 +214,9 @@ cifs_signal_cifsd_for_reconnect(struct TCP_Server_Info *server,
>> }
>> }
>>
>> + if (shutdown)
>> + kill_socket_queues(server);
>> +
>> spin_lock(&cifs_tcp_ses_lock);
>Since this loop still holds cifs_tcp_ses_lock, It can sleep while
>holding a spinlock, causing a scheduling-while-atomic failure.
I totally missed that second loop, will handle that in v3.
AFAICS, the new set_need_reco() can be moved to after unlocking
cifs_tcp_ses_lock, as tcpStatus is already protected by srv_lock.
Any objections to that?
>The
>previous set_need_reco macro did not acquire a mutex.
Yes, the server mutex is needed to access/shutdown server->ssocket,
which is part of the core change in this patch.
>Please check sashiko's review comments.
>
>https://sashiko.dev/#/patchset/20260928150355.850472-1-ematsumiya%40suse.de
The other concerns could be ignored, but I'll address them anyway in v3.
Cheers,
Enzo
>Thanks.
>> list_for_each_entry_safe(server, nserver, &reco, rlist) {
>> list_del_init(&server->rlist);
>> @@ -365,9 +398,10 @@ static bool cifs_tcp_ses_needs_reconnect(struct TCP_Server_Info *server, int num
>> cifs_dbg(FYI, "Mark tcp session as need reconnect\n");
>> trace_smb3_reconnect(server->current_mid, server->conn_id,
>> server->hostname);
>> - server->tcpStatus = CifsNeedReconnect;
>> -
>> spin_unlock(&server->srv_lock);
>> +
>> + set_need_reco(server);
>> +
>> return true;
next prev parent reply other threads:[~2026-09-29 12:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 15:03 [PATCH v2 0/2] reconnect fixes and improvements Enzo Matsumiya
2026-09-28 15:03 ` [PATCH v2 1/2] smb: client: fast fail sends if need to reconnect Enzo Matsumiya
2026-09-29 4:14 ` Namjae Jeon
2026-09-29 12:25 ` Enzo Matsumiya [this message]
2026-09-28 15:03 ` [PATCH v2 2/2] smb: client: prevent premature discard of requests if reconnecting Enzo Matsumiya
2026-10-06 13:49 ` [PATCH v2 0/2] reconnect fixes and improvements Enzo Matsumiya
2026-10-06 15:51 ` Paulo Alcantara
2026-10-06 15:57 ` Enzo Matsumiya
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=arur-tfIfGJAVjWK@suse.de \
--to=ematsumiya@suse.de \
--cc=bharathsm@microsoft.com \
--cc=henrique.carvalho@suse.com \
--cc=linkinjeon@kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=pc@manguebit.org \
--cc=ronniesahlberg@gmail.com \
--cc=sprasad@microsoft.com \
--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