On Tue, Jun 18, 2024 at 11:11:26PM -0700, Christoph Hellwig wrote: > On Mon, Jun 17, 2024 at 05:49:21PM -0700, Darrick J. Wong wrote: > > From: Darrick J. Wong <djwong@xxxxxxxxxx> > > > > Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx> > > Can you add a commit message explaining what this test does and why > you wrote it? Whoops, another one escaped: exchangerange: make sure that we don't swap unwritten extents unless they're part of a rt extent By default, the FILE1_WRITTEN flag for the EXCHANGERANGE ioctl isn't supposed to touch anything except for written extents. In other words, it shouldn't exchange delalloc reservations, unwritten preallocations, or holes. The XFS implementation flushes dirty pagecache to disk so there should never be delalloc reservations running through the exchangerange machinery, but there can be unwritten extents. Hence, write a test to make sure that unwritten extents don't get moved around. This test opts itself out for realtime filesystems where the allocation unit is larger than 1 fsblock because xfs has to move full allocation units, and that requires exchanging of partially written rt extents. --D