smb/client: improve change notify support
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest9 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | smb/client: factor out cifs_new_dir_fileinfo()fs/ fs/ fs/ | +32 | 0 replies | |
| 2/9 | smb/client: close cached notify handles on closedirfs/ fs/ | +34 | 0 replies | |
| 3/9 | smb/client: prepare notify ioctl per-open statefs/ | +16 | 0 replies | |
| 4/9 | smb/client: cache SMB3 change notify handlesfs/ | +51 | 0 replies | |
| 5/9 | smb/client: retry change notify after invalid cached handlefs/ | +34 | 0 replies | |
| 6/9 | smb/client: add helpers for sending cancel requestsfs/ fs/ | +39 | 0 replies | |
| 7/9 | smb/client: remember async ids from SMB2 pending responsesfs/ fs/ | +14 | 0 replies | |
| 8/9 | smb/client: send SMB2 cancel requestsfs/ fs/ fs/ | +112 | 0 replies | |
| 9/9 | smb/client: make SMB2 change notify interruptiblefs/ | +1 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/9] smb/client: improve change notify support
From: ChenXiaoSong <[email protected]>
This patchset improves support for SMB client's notify feature, including the following two improvements:
1. Support for notify cancellation.
2. Support for receiving all action notifications from the server. 2.1. Before this patchset, when an operation on the server triggered multiple actions, the client received only one action notification. 2.2. After this patchset, the client can receive all action notifications.
Example:
smbinfo notify /mnt
# server: touch /export/file1
Notifications received, returned data_len is 24
Action: 0x00000001, FileName: file1
Notifications received, returned data_len is 24
Action: 0x00000003, FileName: file1
# server: mv /export/file1 /export/file2
Notifications received, returned data_len is 48
Action: 0x00000004, FileName: file1
Action: 0x00000005, FileName: file2
Notifications received, returned data_len is 24
Action: 0x00000003, FileName: file2
Notifications received, returned data_len is 24
Action: 0x00000002, FileName: file1
Then press Ctrl+C to exit smbinfo notify command. The following packets can be captured using tcpdump:
- client: Cancel Request
- server: Notify Response, Error: STATUS_CANCELLED
ChenXiaoSong (9):
smb/client: factor out cifs_new_dir_fileinfo() smb/client: close cached notify handles on closedir smb/client: prepare notify ioctl per-open state smb/client: cache SMB3 change notify handles smb/client: retry change notify after invalid cached handle smb/client: add helpers for sending cancel requests smb/client: remember async ids from SMB2 pending responses smb/client: send SMB2 cancel requests
smb/client: make SMB2 change notify interruptible
fs/smb/client/cifsglob.h | 6 ++ fs/smb/client/cifsproto.h | 4 + fs/smb/client/file.c | 54 +++++++++++++ fs/smb/client/readdir.c | 14 ++-- fs/smb/client/smb2ops.c | 148 ++++++++++++++++++++++++++-------- fs/smb/client/smb2pdu.c | 1 + fs/smb/client/smb2proto.h | 3 + fs/smb/client/smb2transport.c | 105 ++++++++++++++++++++++++ fs/smb/client/transport.c | 49 ++++++++--- 9 files changed, 332 insertions(+), 52 deletions(-)
Signature · 1 line
2.54.0