On Thu, Feb 09, 2023 at 11:48:35AM -0800, Linus Torvalds via samba-technical wrote:
So this is exactly *why* splicing from a file all the way to the network will then show any file changes that have happened in between that "splice started" and "network card got the data". You're supposed to use splice only when you can guarantee the data stability (or, alternatively, when you simply don't care about the data stability, and getting the changed data is perfectly fine).
Metze, correct me if I'm wrong but isn't this exactly the "file is leased in SMB3" case ? We already know if a file is leased, and so only use the splice calls for I/O in that case, and fall back to the slower calls in the non-leased case.