RFC smb: client: support directory change tracking
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest2 patches 9 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | smb: client: export SMB2_notify_init for directory change trackingfs/ fs/ | +5 | 0 replies | |
| 2/2 | smb: client: add directory change tracking via SMB2 Change Notifyfs/ fs/ fs/ +4 more | +594 | 9 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/2] smb: client: support directory change tracking
Hello, Steve
This RFC patch series implements directory change tracking logic for the SMB2+ client using the SMB2 Change Notify protocol. When directory monitoring is needed, we send a Change Notify request that remains pending on the server until changes occur. When the server responds with change events, we convert responds to fsnotify event and broadcast them.
If the connections is disrupted, we stop tracking and resume after reconnection completes. Also, we stop tracking when unmount occurs. Cleanup workers run periodically to free tracking structures for directories that are no longer being watched.
This feature is related to f-section of TODO kernel docs.
Points for discussion:
1. This feature generates additional request/response traffic between
server and client. Is the overhead is acceptable?
2. The cleanup worker's working period is proper? Should this interval
be configurable?
3. Should we add a mount option to control this feature at mount time
rather than only having a compile-time CONFIG option? Or maybe apply both?
4. Are there any potential of user-space breaking? Or other
vulnerability.
Future improvements:
1. More sophisticated approach to when tracking should
start/resume/stop to reduce unnecessary calls and checks.
2. improvementse Change Notify response process with various error code
and scenarios.
Basic functionality testing was performed on Ubuntu desktop with this patchset applied, against both Windows 10 Home Server and RPI3 Samba server environments. Also, Edge case testing may be insufficient, and I would appreciate any help with additional test scenarios if possible.
My approach may be incorrect or incomplete in places. Please let me know about thest issues without blame - I'm eager to learn and apply better methods.
Thank you for taking your valuable time to review this work.
Best Regrads,
Sang-Heon Jeon
Sang-Heon Jeon (2):
smb: client: export SMB2_notify_init for directory change tracking
smb: client: add directory change tracking via SMB2 Change Notify
fs/smb/client/Kconfig | 17 ++ fs/smb/client/Makefile | 2 + fs/smb/client/connect.c | 6 + fs/smb/client/notify.c | 528 ++++++++++++++++++++++++++++++++++++++ fs/smb/client/notify.h | 19 ++ fs/smb/client/readdir.c | 9 + fs/smb/client/smb2pdu.c | 8 +- fs/smb/client/smb2proto.h | 4 + 8 files changed, 592 insertions(+), 1 deletion(-) create mode 100644 fs/smb/client/notify.c create mode 100644 fs/smb/client/notify.h
Signature · 1 line
2.43.0