MacOS clients use a compounded CREATE / FSCTL_SRV_REQUEST_RESUME_KEY / CLOSE to determine whether copy-chunk is supported on the SMB server during mount_smbfs operations. Samba is failing with the compounded request with STATUS_INTERNAL_ERROR because of going async in a compounded request. This causes MacOS client to flag samba as not supporting server-side copy. A fairly trivial change to set the defer time for FSCTL_SRV_REQUEST_RESUME_KEY to zero results in MacOS properly identifying support for copy-chunk and server-side copy to work. Reference to relevant MacOS client code: https://github.com/apple-oss-distributions/SMBClient/blob/926c0c131ffcf91d95f1747af37a228d7611753f/kernel/smbfs/smbfs_smb_2.c#L148 Will make merge request shortly.
Can you please share a smbtorture test that excersizes this?
https://gitlab.com/samba-team/samba/-/merge_requests/4093