diff options
author | Steve French <stfrench@microsoft.com> | 2022-10-15 07:43:22 +0200 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2022-10-15 17:05:53 +0200 |
commit | e3e9463414f610e91528f2b920b8cb655f4bae33 (patch) | |
tree | 68cad4efa13223def4aa3d32b138eb7a94e3aedb /net/nsh | |
parent | cifs: lease key is uninitialized in two additional functions when smb1 (diff) | |
download | linux-e3e9463414f610e91528f2b920b8cb655f4bae33.tar.xz linux-e3e9463414f610e91528f2b920b8cb655f4bae33.zip |
smb3: improve SMB3 change notification support
Change notification is a commonly supported feature by most servers,
but the current ioctl to request notification when a directory is
changed does not return the information about what changed
(even though it is returned by the server in the SMB3 change
notify response), it simply returns when there is a change.
This ioctl improves upon CIFS_IOC_NOTIFY by returning the notify
information structure which includes the name of the file(s) that
changed and why. See MS-SMB2 2.2.35 for details on the individual
filter flags and the file_notify_information structure returned.
To use this simply pass in the following (with enough space
to fit at least one file_notify_information structure)
struct __attribute__((__packed__)) smb3_notify {
uint32_t completion_filter;
bool watch_tree;
uint32_t data_len;
uint8_t data[];
} __packed;
using CIFS_IOC_NOTIFY_INFO 0xc009cf0b
or equivalently _IOWR(CIFS_IOCTL_MAGIC, 11, struct smb3_notify_info)
The ioctl will block until the server detects a change to that
directory or its subdirectories (if watch_tree is set).
Acked-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Acked-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'net/nsh')
0 files changed, 0 insertions, 0 deletions