copy on write for splice() from file to pipe?

Herbert Xu herbert at
Mon Feb 13 09:25:26 UTC 2023

Dave Chinner <david at> wrote:
> IOWs, the application does not care if the data changes whilst they
> are in transport attached to the pipe - it only cares that the
> contents are stable once they have been delivered and are now wholly
> owned by the network stack IO path so that the OTW encodings
> (checksum, encryption, whatever) done within the network IO path
> don't get compromised.

Is this even a real problem? The network stack doesn't care at
all if you modify the pages while it's being processed.  All the
things you've mentioned (checksum, encryption, etc.) will be
self-consistent on the wire.

Even when actual hardware offload is involved it's hard to see how
things could possibly go wrong unless the hardware was going out of
its way to do the wrong thing by fetching from memory twice.

Email: Herbert Xu <herbert at>
Home Page:
PGP Key:

More information about the samba-technical mailing list