On Wed, Jun 28, 2023 at 07:30:50AM +0100, David Howells wrote: > Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote: > > > > > Expected behavior: > > > > Punching holes in a file after splicing pages out of that file into a pipe > > > > should not corrupt the spliced-out pages in the pipe buffer. > > I think this bit is the key. Why would this be the expected behaviour? As > you say, splice is allowed to stuff parts of the pagecache into a pipe and > these may get transferred, say, to a network card at the end to transmit > directly from. It's a form of direct I/O. If someone has the pages mmapped, > they can change the data that will be transmitted; if someone does a write(), > they can change that data too. The point of splice is to avoid the copy - but > it comes with a tradeoff. I wouldn't call "post-splice filesystem modifications randomly corrupts pipe data" a tradeoff. I call that a bug. -Dave. -- Dave Chinner david@xxxxxxxxxxxxx