Linux CIFS filesystem development
 help / color / mirror / Atom feed
* [PATCH] cifs: do not query ifaces on smb1 mounts
@ 2023-01-09 16:41 Paulo Alcantara
  2023-01-10 14:57 ` Tom Talpey
  2023-01-10 22:23 ` [PATCH v2] " Paulo Alcantara
  0 siblings, 2 replies; 8+ messages in thread
From: Paulo Alcantara @ 2023-01-09 16:41 UTC (permalink / raw)
  To: smfrench; +Cc: linux-cifs, Paulo Alcantara

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>
---
 fs/cifs/cifsglob.h |  1 +
 fs/cifs/connect.c  | 18 ++++++++++++------
 2 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index cfdd5bf701a1..931e9d5b21f4 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -1240,6 +1240,7 @@ struct cifs_tcon {
 #ifdef CONFIG_CIFS_DFS_UPCALL
 	struct list_head ulist; /* cache update list */
 #endif
+	bool			iface_query_poll:1;
 	struct delayed_work	query_interfaces; /* query interfaces workqueue job */
 };
 
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index d371259d6808..164beb365bfe 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -2366,7 +2366,10 @@ cifs_put_tcon(struct cifs_tcon *tcon)
 	spin_unlock(&cifs_tcp_ses_lock);
 
 	/* cancel polling of interfaces */
-	cancel_delayed_work_sync(&tcon->query_interfaces);
+	if (tcon->iface_query_poll) {
+		tcon->iface_query_poll = false;
+		cancel_delayed_work_sync(&tcon->query_interfaces);
+	}
 
 	if (tcon->use_witness) {
 		int rc;
@@ -2606,11 +2609,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 (!is_smb1_server(ses->server)) {
+		/* schedule query interfaces poll */
+		tcon->iface_query_poll = true;
+		INIT_DELAYED_WORK(&tcon->query_interfaces,
+				  smb2_query_server_interfaces);
+		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);
-- 
2.39.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] cifs: do not query ifaces on smb1 mounts
  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
  1 sibling, 1 reply; 8+ messages in thread
From: Tom Talpey @ 2023-01-10 14:57 UTC (permalink / raw)
  To: Paulo Alcantara, smfrench; +Cc: linux-cifs

On 1/9/2023 11:41 AM, 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>
> ---
>   fs/cifs/cifsglob.h |  1 +
>   fs/cifs/connect.c  | 18 ++++++++++++------
>   2 files changed, 13 insertions(+), 6 deletions(-)
> 
> diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
> index cfdd5bf701a1..931e9d5b21f4 100644
> --- a/fs/cifs/cifsglob.h
> +++ b/fs/cifs/cifsglob.h
> @@ -1240,6 +1240,7 @@ struct cifs_tcon {
>   #ifdef CONFIG_CIFS_DFS_UPCALL
>   	struct list_head ulist; /* cache update list */
>   #endif
> +	bool			iface_query_poll:1;

Why add such a special-case flag, instead of simply checking the
dialect, or (betyter) the server's multichannel capability attribute?

It seems fragile and untestable to set a flag like this, especially
in the tcon, which has nothing to do with supporting the multichannel
fsctl.

Tom.

>   	struct delayed_work	query_interfaces; /* query interfaces workqueue job */
>   };
>   
> diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
> index d371259d6808..164beb365bfe 100644
> --- a/fs/cifs/connect.c
> +++ b/fs/cifs/connect.c
> @@ -2366,7 +2366,10 @@ cifs_put_tcon(struct cifs_tcon *tcon)
>   	spin_unlock(&cifs_tcp_ses_lock);
>   
>   	/* cancel polling of interfaces */
> -	cancel_delayed_work_sync(&tcon->query_interfaces);
> +	if (tcon->iface_query_poll) {
> +		tcon->iface_query_poll = false;
> +		cancel_delayed_work_sync(&tcon->query_interfaces);
> +	}
>   
>   	if (tcon->use_witness) {
>   		int rc;
> @@ -2606,11 +2609,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 (!is_smb1_server(ses->server)) {
> +		/* schedule query interfaces poll */
> +		tcon->iface_query_poll = true;
> +		INIT_DELAYED_WORK(&tcon->query_interfaces,
> +				  smb2_query_server_interfaces);
> +		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);

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] cifs: do not query ifaces on smb1 mounts
  2023-01-10 14:57 ` Tom Talpey
@ 2023-01-10 16:45   ` Paulo Alcantara
  0 siblings, 0 replies; 8+ messages in thread
From: Paulo Alcantara @ 2023-01-10 16:45 UTC (permalink / raw)
  To: Tom Talpey, smfrench; +Cc: linux-cifs

Tom Talpey <tom@talpey.com> writes:

> On 1/9/2023 11:41 AM, 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>
>> ---
>>   fs/cifs/cifsglob.h |  1 +
>>   fs/cifs/connect.c  | 18 ++++++++++++------
>>   2 files changed, 13 insertions(+), 6 deletions(-)
>> 
>> diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
>> index cfdd5bf701a1..931e9d5b21f4 100644
>> --- a/fs/cifs/cifsglob.h
>> +++ b/fs/cifs/cifsglob.h
>> @@ -1240,6 +1240,7 @@ struct cifs_tcon {
>>   #ifdef CONFIG_CIFS_DFS_UPCALL
>>   	struct list_head ulist; /* cache update list */
>>   #endif
>> +	bool			iface_query_poll:1;
>
> Why add such a special-case flag, instead of simply checking the
> dialect, or (betyter) the server's multichannel capability attribute?
>
> It seems fragile and untestable to set a flag like this, especially
> in the tcon, which has nothing to do with supporting the multichannel
> fsctl.

Makes sense.  I'll fix it in v2.

Thanks.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2] cifs: do not query ifaces on smb1 mounts
  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 22:23 ` Paulo Alcantara
  2023-01-10 22:31   ` Steve French
  2023-01-11  1:42   ` Tom Talpey
  1 sibling, 2 replies; 8+ messages in thread
From: Paulo Alcantara @ 2023-01-10 22:23 UTC (permalink / raw)
  To: smfrench; +Cc: linux-cifs, Paulo Alcantara, Steve French

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 &&
+	    (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);
-- 
2.39.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] cifs: do not query ifaces on smb1 mounts
  2023-01-10 22:23 ` [PATCH v2] " Paulo Alcantara
@ 2023-01-10 22:31   ` Steve French
  2023-01-11  1:42   ` Tom Talpey
  1 sibling, 0 replies; 8+ messages in thread
From: Steve French @ 2023-01-10 22:31 UTC (permalink / raw)
  To: Paulo Alcantara; +Cc: linux-cifs, Steve French, Tom Talpey, Shyam Prasad N

tentatively merged into cifs-2.6.git for-next pending testing and
additional reviews

On Tue, Jan 10, 2023 at 4:23 PM Paulo Alcantara <pc@cjr.nz> 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 &&
> +           (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);
> --
> 2.39.0
>


-- 
Thanks,

Steve

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] cifs: do not query ifaces on smb1 mounts
  2023-01-10 22:23 ` [PATCH v2] " Paulo Alcantara
  2023-01-10 22:31   ` Steve French
@ 2023-01-11  1:42   ` Tom Talpey
  2023-01-11  2:24     ` Paulo Alcantara
  1 sibling, 1 reply; 8+ messages in thread
From: Tom Talpey @ 2023-01-11  1:42 UTC (permalink / raw)
  To: Paulo Alcantara, smfrench; +Cc: linux-cifs, Steve French

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);

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] cifs: do not query ifaces on smb1 mounts
  2023-01-11  1:42   ` Tom Talpey
@ 2023-01-11  2:24     ` Paulo Alcantara
  2023-01-11  2:32       ` Tom Talpey
  0 siblings, 1 reply; 8+ messages in thread
From: Paulo Alcantara @ 2023-01-11  2:24 UTC (permalink / raw)
  To: Tom Talpey, smfrench; +Cc: linux-cifs, Steve French

On 10 January 2023 22:42:33 GMT-03:00, Tom Talpey <tom@talpey.com> wrote:
>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..

The dialect test is still necessary, otherwise we'd end up mixing SMB2_GLOBAL_CAP_MULTI_CHANNEL with CAP_LARGE_FILES[1] and then scheduling the worker for smb1 mounts.

I quickly tested it and the global cap test passed for smb1 mount due to CAP_LARGE_FILES being set.

[1] https://git.cjr.nz/linux.git/tree/fs/cifs/cifspdu.h#n533


>
>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);


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] cifs: do not query ifaces on smb1 mounts
  2023-01-11  2:24     ` Paulo Alcantara
@ 2023-01-11  2:32       ` Tom Talpey
  0 siblings, 0 replies; 8+ messages in thread
From: Tom Talpey @ 2023-01-11  2:32 UTC (permalink / raw)
  To: Paulo Alcantara, smfrench; +Cc: linux-cifs, Steve French

On 1/10/2023 9:24 PM, Paulo Alcantara wrote:
> On 10 January 2023 22:42:33 GMT-03:00, Tom Talpey <tom@talpey.com> wrote:
>> 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..
> 
> The dialect test is still necessary, otherwise we'd end up mixing SMB2_GLOBAL_CAP_MULTI_CHANNEL with CAP_LARGE_FILES[1] and then scheduling the worker for smb1 mounts.

Oh, yuck.

OK.

> I quickly tested it and the global cap test passed for smb1 mount due to CAP_LARGE_FILES being set.
> 
> [1] https://git.cjr.nz/linux.git/tree/fs/cifs/cifspdu.h#n533
> 
> 
>>
>> 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);
> 
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-01-11  2:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2023-01-11  2:24     ` Paulo Alcantara
2023-01-11  2:32       ` Tom Talpey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox