Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Tom Talpey <tom@talpey.com>
To: Paulo Alcantara <pc@cjr.nz>, smfrench@gmail.com
Cc: linux-cifs@vger.kernel.org, Steve French <stfrench@microsoft.com>
Subject: Re: [PATCH v2] cifs: do not query ifaces on smb1 mounts
Date: Tue, 10 Jan 2023 20:42:33 -0500	[thread overview]
Message-ID: <25f67260-e483-b81b-2fde-7df7d3359370@talpey.com> (raw)
In-Reply-To: <20230110222321.30860-1-pc@cjr.nz>

On 1/10/2023 5:23 PM, Paulo Alcantara wrote:
> Users have reported the following error on every 600 seconds
> (SMB_INTERFACE_POLL_INTERVAL) when mounting SMB1 shares:
> 
> 	CIFS: VFS: \\srv\share error -5 on ioctl to get interface list
> 
> It's supported only by SMB2+, so do not query network interfaces on
> SMB1 mounts.
> 
> Fixes: 6e1c1c08cdf3 ("cifs: periodically query network interfaces from server")
> Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
> Signed-off-by: Steve French <stfrench@microsoft.com>
> ---
> v1 -> v2:
> 	remove cifs_tcon::iface_query_poll and then check version and
> 	server's capability multichannel
> 
>   fs/cifs/connect.c | 9 ++++++---
>   1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
> index d371259d6808..b2a04b4e89a5 100644
> --- a/fs/cifs/connect.c
> +++ b/fs/cifs/connect.c
> @@ -2606,11 +2606,14 @@ cifs_get_tcon(struct cifs_ses *ses, struct smb3_fs_context *ctx)
>   	INIT_LIST_HEAD(&tcon->pending_opens);
>   	tcon->status = TID_GOOD;
>   
> -	/* schedule query interfaces poll */
>   	INIT_DELAYED_WORK(&tcon->query_interfaces,
>   			  smb2_query_server_interfaces);
> -	queue_delayed_work(cifsiod_wq, &tcon->query_interfaces,
> -			   (SMB_INTERFACE_POLL_INTERVAL * HZ));
> +	if (ses->server->dialect >= SMB30_PROT_ID &&

The dialect test is actually unnecessary, because the server
global capability, indicating the support, is what's important.
But it's harmless to be explicit, so...

Reviewed-by: Tom Talpey <tom@talpey.com>

LGTM.

> +	    (ses->server->capabilities & SMB2_GLOBAL_CAP_MULTI_CHANNEL)) {
> +		/* schedule query interfaces poll */
> +		queue_delayed_work(cifsiod_wq, &tcon->query_interfaces,
> +				   (SMB_INTERFACE_POLL_INTERVAL * HZ));
> +	}
>   
>   	spin_lock(&cifs_tcp_ses_lock);
>   	list_add(&tcon->tcon_list, &ses->tcon_list);

  parent reply	other threads:[~2023-01-11  1:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-09 16:41 [PATCH] cifs: do not query ifaces on smb1 mounts Paulo Alcantara
2023-01-10 14:57 ` Tom Talpey
2023-01-10 16:45   ` Paulo Alcantara
2023-01-10 22:23 ` [PATCH v2] " Paulo Alcantara
2023-01-10 22:31   ` Steve French
2023-01-11  1:42   ` Tom Talpey [this message]
2023-01-11  2:24     ` Paulo Alcantara
2023-01-11  2:32       ` Tom Talpey

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=25f67260-e483-b81b-2fde-7df7d3359370@talpey.com \
    --to=tom@talpey.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=pc@cjr.nz \
    --cc=smfrench@gmail.com \
    --cc=stfrench@microsoft.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