A well designed file system should consider any copy an atomic operation: either it succeeds or it fails, full stop. ZFS, as a copy on write system, works this way by default. (Other file systems don’t always consider copies atomic, and having used those they provide an interesting experience that I do not always enjoy.)
Corruption in this context would occur when, for example, something somehow goes wrong with the transfer but the operation is not atomic. It might appear to the user that the file copy completed, as there’s a file of some kind in the destination directory, but it’s not a 1:1 copy. The data is now corrupted. Worse, it may have been corrupted silently and without warning. If you then lose the original copy, you’re really in trouble and better hope there’s a backup.
Worse, since TrueNAS implements this feature using ZFS block cloning, there’s an entire extra layer of how/if ZFS handles that failure, and whether SAMBA and ZFS communicate correctly about that failure to present the true state of the filesystem to the user.
SAMBA is old. It’s an open source re-implmentation of Microsoft’s SMB protocol to provide compatibility to non-Windows systems. (Windows has native SMB. It doesn’t need SAMBA.)
SAMBA was originally based on a very early version of Windows’ SMB file sharing protocol that existed before I learned the word lumbago, which was definitely not robust, and was intended by Microsoft to be a purely Windows-to-Windows thing. SAMBA has had to keep up ever since, racing to implement new features and prevent breaks. And when Apple implemented SMB, it didn’t (and still doesn’t, apparently) follow the SAMBA standard to the extent that SAMBA has to employ a whole subset of settings to try to accommodate for that.
(I’m giving Apple the benefit of the doubt and assuming there was a defensible reason not to 1:1 implement the SAMBA protocol at the time, and how that’s become technical debt that’s calcified into Mac OS.)
I feel like we might be going around in circles a bit at this point.
Hopefully, soon we can determine the current behavior under Fangtooth as-per iX’s request, and then go from there.