linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [CIFS][PATCH] Add SMB3/Win10-only  Change Notify
       [not found]   ` <CAH2r5mst9FjdPrBQdjt1HGkf73VoNzDUxPSEQNZwyi=9W9XGhA@mail.gmail.com>
@ 2020-02-12 23:32     ` L Walsh
  2020-02-13  4:43       ` Steve French
  0 siblings, 1 reply; 2+ messages in thread
From: L Walsh @ 2020-02-12 23:32 UTC (permalink / raw)
  To: Steve French; +Cc: CIFS, Linux-Kernel

On 2020/02/10 06:30, Steve French wrote:
>
>>     By calling it a SMB3 feature, does that mean you are removing
>> it from SMB2?
>>     
>
> That is a good question.  I should have made more clear that although
> many servers support Change Notify prior to SMB3 dialect, we chose
> to implement it in SMB3 (late 2012 and later dialect) to minimize testing
> risks and since we want to encourage users to use SMB3 or later (or
> at least SMB2.1 or later since security is significantly better for later
> dialects than for SMB1 and even SMB2)
>   
----
    SMB2.1 would be fine for my purposes, I find it a bit odd though that
my linux server running these changes won't be as capable of detecting
directory changes as an outdated Win7 machine. 

    There are many below-SMB3 speaking devices out in the world right now. 
Probably many below 2.1. 

    You say you want to "encourage users to use SMB3 or later (or at least
SMB2.1)", how does adding SMB3-only support allow users to use SMB2.1?
Say your encouragement of users is taken to heart, and they want to use 
SMB3.
How would those users upgrade the dialect of SMB used in their
machine or device?  I don't know of any easy way to upgrade existing 
devices -
even existing OS's, if a user ran Win7, how would they upgrade the CIFS
drivers to 3.0?

    If it is not possible to upgrade existing devices, then wouldn't that
encouragement boil down to junking the device and buying a new one?
> Change Notify is available in all dialects (SMB2, SMB2.1, SMB3, SMB3.1.1)
> for many servers but for the client we just implemented it for SMB3 and later.
>   
    Doesn't that mean that the linux client won't be able to access 
existing
NAS servers or Win-Client machine running anything other than Win10?  Does
the current version of samba provide full SMB3 support?  If not, doesn't 
that
imply that the client for CIFS won't be able to access or use these features
from another linux server?
> If you have a server that you want to support that requires
> SMB2 or SMB2.1 mounts, I wouldn't mind a patch to add notify support
> for those older dialects but I would like to encourage use of SMB3 or later (or
> at least SMB2.1 or later) where possible.
>   
    Again, how does implementing SMB3-only, only support SMB2.1 or later?

    If you feel it would be trivial to add such a patch, wouldn't you be in
the position of, probably, having the most knowledge about the subject 
and be
likely to do the best job without breaking anything else?  Certainly doesn't
mean someone else couldn't but seems riskier than offering a Linux 
client that
would be able to access the widest range of existing devices and 
computers from
the start.

Thanks!
Linda








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

* Re: [CIFS][PATCH] Add SMB3/Win10-only Change Notify
  2020-02-12 23:32     ` [CIFS][PATCH] Add SMB3/Win10-only Change Notify L Walsh
@ 2020-02-13  4:43       ` Steve French
  0 siblings, 0 replies; 2+ messages in thread
From: Steve French @ 2020-02-13  4:43 UTC (permalink / raw)
  To: L Walsh; +Cc: CIFS, Linux-Kernel

[-- Attachment #1: Type: text/plain, Size: 3703 bytes --]

I don't object to adding the feature to 2.1, and if you have SMB2.1
devices to try even better (I can add your tested-by ...) but 99% of
my testing these days is with SMB3 or later target servers (Samba,
Azure, Windows 10, Windows 2016 or later, the cifsd kernel server
etc.).  We do some testing with the buildbot with SMB2.1 dialect but
it is a little different forcing the dialect to 2.1 on the mount (to a
server which would otherwise support later dialects) vs. actually
running to an older device (Samba server e.g. has supported SMB3 for a
very, very long time - at least seven years so we have to go back
pretty far).

If you have the ability to try the attached patch which enables it for
SMB 2.1 dialect let me know.  (I have also pushed it to cifs-2.6.git
for-next to allow it to be tested)


On Wed, Feb 12, 2020 at 5:33 PM L Walsh <cifs@tlinx.org> wrote:
>
> On 2020/02/10 06:30, Steve French wrote:
> >
> >>     By calling it a SMB3 feature, does that mean you are removing
> >> it from SMB2?
> >>
> >
> > That is a good question.  I should have made more clear that although
> > many servers support Change Notify prior to SMB3 dialect, we chose
> > to implement it in SMB3 (late 2012 and later dialect) to minimize testing
> > risks and since we want to encourage users to use SMB3 or later (or
> > at least SMB2.1 or later since security is significantly better for later
> > dialects than for SMB1 and even SMB2)
> >
> ----
>     SMB2.1 would be fine for my purposes, I find it a bit odd though that
> my linux server running these changes won't be as capable of detecting
> directory changes as an outdated Win7 machine.
>
>     There are many below-SMB3 speaking devices out in the world right now.
> Probably many below 2.1.
>
>     You say you want to "encourage users to use SMB3 or later (or at least
> SMB2.1)", how does adding SMB3-only support allow users to use SMB2.1?
> Say your encouragement of users is taken to heart, and they want to use
> SMB3.
> How would those users upgrade the dialect of SMB used in their
> machine or device?  I don't know of any easy way to upgrade existing
> devices -
> even existing OS's, if a user ran Win7, how would they upgrade the CIFS
> drivers to 3.0?
>
>     If it is not possible to upgrade existing devices, then wouldn't that
> encouragement boil down to junking the device and buying a new one?
> > Change Notify is available in all dialects (SMB2, SMB2.1, SMB3, SMB3.1.1)
> > for many servers but for the client we just implemented it for SMB3 and later.
> >
>     Doesn't that mean that the linux client won't be able to access
> existing
> NAS servers or Win-Client machine running anything other than Win10?  Does
> the current version of samba provide full SMB3 support?  If not, doesn't
> that
> imply that the client for CIFS won't be able to access or use these features
> from another linux server?
> > If you have a server that you want to support that requires
> > SMB2 or SMB2.1 mounts, I wouldn't mind a patch to add notify support
> > for those older dialects but I would like to encourage use of SMB3 or later (or
> > at least SMB2.1 or later) where possible.
> >
>     Again, how does implementing SMB3-only, only support SMB2.1 or later?
>
>     If you feel it would be trivial to add such a patch, wouldn't you be in
> the position of, probably, having the most knowledge about the subject
> and be
> likely to do the best job without breaking anything else?  Certainly doesn't
> mean someone else couldn't but seems riskier than offering a Linux
> client that
> would be able to access the widest range of existing devices and
> computers from
> the start.
>
> Thanks!
> Linda
>
>
>
>
>
>
>


--
Thanks,

Steve

[-- Attachment #2: 0001-cifs-enable-change-notification-for-SMB2.1-dialect.patch --]
[-- Type: text/x-patch, Size: 1023 bytes --]

From 9562f170bf7085407bec22c20ee2a13334d20a56 Mon Sep 17 00:00:00 2001
From: Steve French <stfrench@microsoft.com>
Date: Wed, 12 Feb 2020 22:37:08 -0600
Subject: [PATCH] cifs: enable change notification for SMB2.1 dialect

It was originally enabled only for SMB3 or later dialects, but
had requests to add it to SMB2.1 mounts as well given the
large number of systems at that dialect level.

Signed-off-by: Steve French <stfrench@microsoft.com>
Reported-by: L Walsh <cifs@tlinx.org>
---
 fs/cifs/smb2ops.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index baa825f4cec0..aef33630e315 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -4795,6 +4795,7 @@ struct smb_version_operations smb21_operations = {
 	.wp_retry_size = smb2_wp_retry_size,
 	.dir_needs_close = smb2_dir_needs_close,
 	.enum_snapshots = smb3_enum_snapshots,
+	.notify = smb3_notify,
 	.get_dfs_refer = smb2_get_dfs_refer,
 	.select_sectype = smb2_select_sectype,
 #ifdef CONFIG_CIFS_XATTR
-- 
2.20.1


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

end of thread, other threads:[~2020-02-13  4:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAH2r5mtQRVX3_-_sVjvigRSv2LpSoUBQo7YeY5v0nXm7BGaDig@mail.gmail.com>
     [not found] ` <5E413F22.3070101@tlinx.org>
     [not found]   ` <CAH2r5mst9FjdPrBQdjt1HGkf73VoNzDUxPSEQNZwyi=9W9XGhA@mail.gmail.com>
2020-02-12 23:32     ` [CIFS][PATCH] Add SMB3/Win10-only Change Notify L Walsh
2020-02-13  4:43       ` Steve French

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 NNTP newsgroup(s).