Skip to content

smb/server: change notify support

ChenXiaoSong linux-cifs 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest13 patches 3 repliesIn review
  2. v112 patches 4 repliesSuperseded

Changes in v2 from the cover letter

- Patch #04 #07: fix LAST_WRITE and LAST_ACCESS notify event mappings.
- Patch #04 #08 #09 #11 #12: limit notify event memory per open.
- Add patch #13: support change notify for named streams.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13smb/server: move change notify handling into notify.cfs/smb/server/Makefile fs/smb/server/notify.c fs/smb/server/notify.h +1 more+215 -1070 replies
2/13smb/server: add more validation for change notify requestsfs/smb/server/notify.c+31 -00 replies
3/13smb/server: add debug type for change notifyfs/smb/server/glob.h fs/smb/server/notify.c fs/smb/server/server.c +1 more+16 -30 replies
4/13smb/server: support non-recursive directory change watchesfs/smb/server/Kconfig fs/smb/server/notify.c fs/smb/server/notify.h+232 -31 reply
5/13smb/server: support recursive directory change watchesfs/smb/server/notify.c fs/smb/server/notify.h+149 -60 replies
6/13smb/server: keep notify watches on file handlesfs/smb/server/notify.c fs/smb/server/notify.h fs/smb/server/vfs_cache.c +1 more+49 -40 replies
7/13smb/server: save simple notify eventsfs/smb/server/notify.c fs/smb/server/notify.h+197 -10 replies
8/13smb/server: save old names for rename notify eventsfs/smb/server/notify.c fs/smb/server/notify.h+88 -00 replies
9/13smb/server: match rename notify eventsfs/smb/server/notify.c+88 -100 replies
10/13smb/server: encode notify eventsfs/smb/server/notify.c+106 -00 replies
11/13smb/server: send notify events to the clientfs/smb/server/notify.c fs/smb/server/notify.h+210 -30 replies
12/13smb/server: break directory leases before sending notify eventsfs/smb/server/notify.c fs/smb/server/oplock.c fs/smb/server/oplock.h+72 -30 replies
13/13smb/server: support change notify for named streamsfs/smb/server/notify.c fs/smb/server/notify.h fs/smb/server/vfs.c+192 -80 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 00/13] smb/server: change notify support

From: ChenXiaoSong <[email protected]>

v1->v2:
- Patch #04 #07: fix LAST_WRITE and LAST_ACCESS notify event mappings.
- Patch #04 #08 #09 #11 #12: limit notify event memory per open.
- Add patch #13: support change notify for named streams.

v1: https://lore.kernel.org/linux-cifs/[email protected]/

TODO: The KUnit test cases are still being modified.

To test this feature, the following patches need to be applied to cifs-utils and kernel smb client:
- cifs-utils: https://chenxiaosong.com/lkml/cifs-utils-parse-notify
- kernel smb client: https://chenxiaosong.com/lkml/cifs-improve-notify

The complete kernel client and server patches are also available at the following link:
https://chenxiaosong.com/repo/linux/ksmbd-change-notify

ChenXiaoSong (13):
smb/server: move change notify handling into notify.c smb/server: add more validation for change notify requests smb/server: add debug type for change notify smb/server: support non-recursive directory change watches smb/server: support recursive directory change watches smb/server: keep notify watches on file handles smb/server: save simple notify events
smb/server: save old names for rename notify events smb/server: match rename notify events
smb/server: encode notify events
smb/server: send notify events to the client smb/server: break directory leases before sending notify events smb/server: support change notify for named streams

 fs/smb/server/Kconfig     |    1 +
 fs/smb/server/Makefile    |    3 +-
 fs/smb/server/glob.h      |    3 +-
 fs/smb/server/notify.c    | 1415 +++++++++++++++++++++++++++++++++++++
 fs/smb/server/notify.h    |   80 +++
 fs/smb/server/oplock.c    |   40 ++
 fs/smb/server/oplock.h    |    1 +
 fs/smb/server/server.c    |    2 +-
 fs/smb/server/smb2pdu.c   |  112 +--
 fs/smb/server/vfs.c       |   67 +-
 fs/smb/server/vfs_cache.c |    3 +
 fs/smb/server/vfs_cache.h |    4 +
 12 files changed, 1614 insertions(+), 117 deletions(-)
 create mode 100644 fs/smb/server/notify.c
 create mode 100644 fs/smb/server/notify.h
Signature · 1 line
2.55.0