Re: [PATCH] generic/795: add unaligned boundary test cases for WRITE_ZEROES
Christoph Hellwig <[email protected]> Tue, 7 Jul 2026 07:10:15 +0200
| Newsgroups | org.kernel.vger.fstests,org.kernel.vger.linux-xfs |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Jul 07, 2026 at 11:08:39AM +0800, Zhang Yi wrote: > > +# WRITE_ZEROES must leave the whole requested range backed by *written* > > +# (zeroed) extents while preserving the out-of-range bytes of the partial > > +# boundary units. The possible scenarios are: written_edges, hole_edges, > > +# unwritten_edges and delalloc_edges. > > unwritten_edges needs to distinguish between dirty and clean scenarios. > The expected result for clean should be tmp.zero, while the expected > result for dirty should be tmp.pattern. Does it? I'd expect everything in the range to be zeroed, and everything outside to be left alone, as the dirty state is just an imlementation detail not visible to the user. Similar to other falloc operations, I'd expect the file system to write back any boundary block first to make the dirty state difference moot.