From: ChenXiaoSong <chenxiaosong@chenxiaosong.com>
To: smfrench@gmail.com, linkinjeon@kernel.org, pc@manguebit.org,
ronniesahlberg@gmail.com, sprasad@microsoft.com, tom@talpey.com,
bharathsm@microsoft.com, senozhatsky@chromium.org,
dhowells@redhat.com, metze@samba.org
Cc: linux-cifs@vger.kernel.org, ChenXiaoSong <chenxiaosong@kylinos.cn>
Subject: [PATCH 0/9] smb/client: improve change notify support
Date: Wed, 1 Jul 2026 08:24:58 +0000 [thread overview]
Message-ID: <20260701082507.786487-1-chenxiaosong@chenxiaosong.com> (raw)
From: ChenXiaoSong <chenxiaosong@kylinos.cn>
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(-)
--
2.54.0
next reply other threads:[~2026-07-01 8:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-01 8:24 ChenXiaoSong [this message]
2026-07-01 8:24 ` [PATCH 1/9] smb/client: factor out cifs_new_dir_fileinfo() ChenXiaoSong
2026-07-01 8:25 ` [PATCH 2/9] smb/client: close cached notify handles on closedir ChenXiaoSong
2026-07-01 8:25 ` [PATCH 3/9] smb/client: prepare notify ioctl per-open state ChenXiaoSong
2026-07-01 8:25 ` [PATCH 4/9] smb/client: cache SMB3 change notify handles ChenXiaoSong
2026-07-01 8:25 ` [PATCH 5/9] smb/client: retry change notify after invalid cached handle ChenXiaoSong
2026-07-01 8:25 ` [PATCH 6/9] smb/client: add helpers for sending cancel requests ChenXiaoSong
2026-07-01 8:25 ` [PATCH 7/9] smb/client: remember async ids from SMB2 pending responses ChenXiaoSong
2026-07-01 8:25 ` [PATCH 8/9] smb/client: send SMB2 cancel requests ChenXiaoSong
2026-07-01 8:25 ` [PATCH 9/9] smb/client: make SMB2 change notify interruptible ChenXiaoSong
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=20260701082507.786487-1-chenxiaosong@chenxiaosong.com \
--to=chenxiaosong@chenxiaosong.com \
--cc=bharathsm@microsoft.com \
--cc=chenxiaosong@kylinos.cn \
--cc=dhowells@redhat.com \
--cc=linkinjeon@kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=metze@samba.org \
--cc=pc@manguebit.org \
--cc=ronniesahlberg@gmail.com \
--cc=senozhatsky@chromium.org \
--cc=smfrench@gmail.com \
--cc=sprasad@microsoft.com \
--cc=tom@talpey.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