Re: [PATCH v2] generic/795: add unaligned boundary test cases for WRITE_ZEROES
Pankaj Raghav <[email protected]> Mon, 13 Jul 2026 09:28:31 +0200
| Newsgroups | org.kernel.vger.fstests,org.kernel.vger.linux-ext4,org.kernel.vger.linux-xfs |
|---|---|
| Message-ID | <[email protected]> |
On 7/10/26 10:23, Zhang Yi wrote: > +CC ext4 list > > On 7/9/2026 4:30 PM, Pankaj Raghav wrote: >> During the review of WRITE_ZEROES support to XFS, Zhang Yi pointed out >> some important semantics for the boundary blocks when WRITE_ZEROES >> command is used.[1] >> >> The test cases check the boundary blocks when they are in different >> states and WRITE_ZEROES are issued that straddle the boundary. Along with that, >> test cases have been added when a EoF straddles an allocation unit. >> >> [1] https://lore.kernel.org/linux-xfs/[email protected]/ >> >> Signed-off-by: Pankaj Raghav <[email protected]> > > Thank you for the test! The changes look good to me, and it works well > with my ext4 fixes as well. > > Reviewed-by: Zhang Yi <[email protected]> > Thanks. > Unfortunately, I've found a bug in filefrag that causes delalloc extents > to be reported with a length of 0. This means this test case can miss > delalloc extents. The issue is in misc/filefrag.c's print_extent_info(), > where ext_len is incorrectly set to 0 for the FIEMAP_EXTENT_UNKNOWN or > EXT4_FIEMAP_EXTENT_HOLE cases. Could you please send a patch to fix this > as well? > I think I see it here: if ((fm_extent->fe_flags & FIEMAP_EXTENT_UNKNOWN) || (fm_extent->fe_flags & EXT4_FIEMAP_EXTENT_HOLE)) { ext_len = 0; ext_blks_phys = 0; } else ext_blks_phys = ext_blks; I will send a fix soon as a separate patch. -- Pankaj