Is zfs receive
an atomic operation? Can a process read from or write to the receiving file system during the zfs receive
operation? Can a process read any of the files in the incoming snapshot stream before the zfs receive
operation completes?
zfs receive
is atomic indeed. The incoming snapshot is not available until the receive completes successfully.The receiving file system is unavailable (unmounted) during the reception of an incremental snapshot.
In the case of a full file system snapshot, there is no receiving file system in the first place.
Note that atomic doesn't means instantaneous, just that it is an all or nothing operation.
In particular, if you are unlucky enough for the data to be corrupted during its transport, the operation fails and ends with dataset rollback/destroy operation. That might trigger a significant activity and load if the size of the data already sent is large. Thanks to Nex7 for pointing that out.