Linux CIFS filesystem development
 help / color / mirror / Atom feed
* [PATCH v2 0/6] ksmbd: add macOS Time Machine / AAPL SMB2 extension support
@ 2026-07-09  0:06 Gaël Blivet-Bailly
  2026-07-09  0:06 ` [PATCH v2 1/6] ksmbd: add Apple AAPL kAAPL_SERVER_QUERY create context support Gaël Blivet-Bailly
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: Gaël Blivet-Bailly @ 2026-07-09  0:06 UTC (permalink / raw)
  To: Namjae Jeon; +Cc: Gael Blivet, linux-cifs

From: Gael Blivet <gael.blivet@gmail.com>

Link to v1:
https://lore.kernel.org/linux-cifs/20260707100129.47563-1-g.blivet@me.com/

v2 addresses the CHANGE_NOTIFY CANCEL concern raised on v1:
smb2_cancel() calls each async request's cancel_fn() while holding
conn->request_lock, so cancel_fn must not sleep. Patch 4 now splits
this into inline lock-protected list/state manipulation (matching
every other cancel_fn in this file) plus a workqueue-deferred send of
the actual STATUS_CANCELLED response, which is the one part that
sleeps.

Separately: the corresponding ksmbd-tools userspace patch (aapl_model
field, "time machine"/"aapl model" config options) has been sent to
that project directly, since it's a different repository from this
kernel series.

New since v1: patch 6, AAPL READDIR_ATTR V2 support -- real macOS
clients negotiate V2 over V1 when both are offered, so v1-only left a
gap for current macOS versions.

Also new: patches 1, 3, and 6 are now additionally cross-checked
against Apple's published SMBClient kernel source
(apple-oss-distributions/SMBClient, smb_smb_2.c) -- everything matched
the network-derived understanding v1 was built on, except one
inaccurate assumption in patch 3, now corrected.

Patch 5 also gets a correctness fix: the synthesized ChunkCount=0
full-copy response was reporting ChunksWritten=1/ChunkBytesWritten=
<file size>, describing a chunk the client never actually sent (it
sent zero). Now reports 0/0, matching what's actually been validated
against a real client; only TotalBytesWritten carries a value.

Patches 1-4 are otherwise unchanged in substance from v1, re-derived
against the current tree (this branch has moved since v1).

Gael Blivet (6):
  ksmbd: add Apple AAPL kAAPL_SERVER_QUERY create context support
  ksmbd: synthesize empty AFP_AfpInfo xattr on first probe
  ksmbd: send inline FinderInfo in FIND responses when READDIR_ATTR
    negotiated
  ksmbd: defer CHANGE_NOTIFY completion instead of
    STATUS_NOT_IMPLEMENTED
  ksmbd: implement full-file copy for AAPL ChunkCount=0 COPYCHUNK
  ksmbd: add AAPL READDIR_ATTR V2 support

 fs/smb/common/smb2pdu.h       |   8 +
 fs/smb/common/smbglob.h       |   1 +
 fs/smb/server/connection.h    |   2 +
 fs/smb/server/ksmbd_netlink.h |   4 +-
 fs/smb/server/ksmbd_work.c    |   1 +
 fs/smb/server/ksmbd_work.h    |   2 +
 fs/smb/server/oplock.c        |  85 +++++++
 fs/smb/server/oplock.h        |   2 +
 fs/smb/server/server.h        |   2 +
 fs/smb/server/smb2ops.c       |   4 +
 fs/smb/server/smb2pdu.c       | 442 ++++++++++++++++++++++++++++++++--
 fs/smb/server/smb2pdu.h       |  76 ++++++
 fs/smb/server/transport_ipc.c |   9 +
 fs/smb/server/vfs.c           |  88 +++++++
 fs/smb/server/vfs.h           |   1 +
 fs/smb/server/vfs_cache.c     |  48 ++++
 fs/smb/server/vfs_cache.h     |   6 +
 17 files changed, 758 insertions(+), 23 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2026-07-10 13:28 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-09  0:06 [PATCH v2 0/6] ksmbd: add macOS Time Machine / AAPL SMB2 extension support Gaël Blivet-Bailly
2026-07-09  0:06 ` [PATCH v2 1/6] ksmbd: add Apple AAPL kAAPL_SERVER_QUERY create context support Gaël Blivet-Bailly
2026-07-09  0:06 ` [PATCH v2 2/6] ksmbd: synthesize empty AFP_AfpInfo xattr on first probe Gaël Blivet-Bailly
2026-07-09  0:06 ` [PATCH v2 3/6] ksmbd: send inline FinderInfo in FIND responses when READDIR_ATTR negotiated Gaël Blivet-Bailly
2026-07-09  0:06 ` [PATCH v2 4/6] ksmbd: defer CHANGE_NOTIFY completion instead of STATUS_NOT_IMPLEMENTED Gaël Blivet-Bailly
2026-07-09  7:03   ` ChenXiaoSong
2026-07-09  9:24   ` ChenXiaoSong
2026-07-10  5:59     ` Gaël Blivet
2026-07-10  6:48       ` ChenXiaoSong
2026-07-10  7:04         ` ChenXiaoSong
2026-07-10  8:54           ` Gaël Blivet
2026-07-10  9:15             ` ChenXiaoSong
2026-07-10 13:28               ` Gaël Blivet
2026-07-09  0:06 ` [PATCH v2 5/6] ksmbd: implement full-file copy for AAPL ChunkCount=0 COPYCHUNK Gaël Blivet-Bailly
2026-07-09  0:06 ` [PATCH v2 6/6] ksmbd: add AAPL READDIR_ATTR V2 support Gaël Blivet-Bailly
2026-07-09 13:15 ` [PATCH v2 0/6] ksmbd: add macOS Time Machine / AAPL SMB2 extension support Namjae Jeon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox