Linux-CIFS Archive mirror
 help / color / mirror / Atom feed
From: Rickard x Andersson <rickaran@axis.com>
To: Steve French <smfrench@gmail.com>
Cc: linux-cifs@vger.kernel.org, samba-technical@lists.samba.org,
	sfrench@samba.org, pc@manguebit.com, ronniesahlberg@gmail.com,
	sprasad@microsoft.com, tom@talpey.com,
	linux-kernel@vger.kernel.org, rickard314.andersson@gmail.com,
	kernel@axis.com
Subject: Re: [PATCH v2 1/1] smb: client: Fix hang in smb2_reconnect
Date: Mon, 15 Apr 2024 16:35:02 +0200	[thread overview]
Message-ID: <258e2dba-da30-795f-6408-85c06e137b61@axis.com> (raw)
In-Reply-To: <CAH2r5msm+xFyMPCJV7Luf6aQ04cHOhevmjJi8J-2Bf711T1ziQ@mail.gmail.com>

On 4/13/24 11:02, Steve French wrote:
> Shyam and I tried some experiments and there are two cases where the
> patch breaks:
> 1) ChangeNotify will time out
> 2) Certainly byte range lock calls (they can be allowed to block) will timeout
> 
> An obvious alternative would be to not make this change for the
> commands like ChangeNotify and blocking locks but allow it for the
> others.
> 

Would it make sense to make the patch less intrusive by doing something 
like the following?:

@@ -1209,7 +1216,12 @@ compound_send_recv(const unsigned int xid, struct 
cifs_ses *ses,
         spin_unlock(&ses->ses_lock);

         for (i = 0; i < num_rqst; i++) {
-               rc = wait_for_response(server, midQ[i]);
+               if (flags == CIFS_NEG_OP) {

+                       rc = wait_for_response(server, midQ[i], 50*1000);
+               }
+               else
+                       rc = wait_for_response(server, midQ[i], -1);
                 if (rc != 0)
                         break;



So, we are just waiting with timeout in the case it is a "CIFS_NEG_OP".

Note that I am not familiar at all with this code base.

Best regards,
Rickard

      parent reply	other threads:[~2024-04-15 14:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-09 11:27 [PATCH v2 0/1] smb client hang Rickard Andersson
2024-04-09 11:27 ` [PATCH v2 1/1] smb: client: Fix hang in smb2_reconnect Rickard Andersson
2024-04-09 17:19   ` Steve French
2024-04-13  9:02   ` Steve French
     [not found]     ` <CAH2r5mud2YyUAT+n4M5m+gZK3e=Y61O0LwTATw+BiB-oz+BBWw@mail.gmail.com>
2024-04-15 12:05       ` Rickard x Andersson
2024-04-15 14:35     ` Rickard x Andersson [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=258e2dba-da30-795f-6408-85c06e137b61@axis.com \
    --to=rickaran@axis.com \
    --cc=kernel@axis.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pc@manguebit.com \
    --cc=rickard314.andersson@gmail.com \
    --cc=ronniesahlberg@gmail.com \
    --cc=samba-technical@lists.samba.org \
    --cc=sfrench@samba.org \
    --cc=smfrench@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).