]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
ext4: Test atomic writes allocation and write codepaths with bigalloc
authorRitesh Harjani (IBM) <ritesh.list@gmail.com>
Fri, 19 Sep 2025 06:48:04 +0000 (12:18 +0530)
committerZorro Lang <zlang@kernel.org>
Sat, 18 Oct 2025 15:08:00 +0000 (23:08 +0800)
commit4bbc4694a052ff6ccfbb26cfec1259999b060270
tree166e8b549a22fd84a51677859992a08ca6472c3a
parent3a530a3f9e8b726a5f8fda619f2c0f1222ce3d02
ext4: Test atomic writes allocation and write codepaths with bigalloc

This test does a parallel RWF_ATOMIC IO on a multiple truncated files in
a small FS. The idea is to stress ext4 allocator to ensure we are able
to handle low space scenarios correctly with atomic writes. We brute
force this for different blocksize and clustersizes and after each
iteration we ensure the data was not torn or corrupted using fio crc
verification.

Note that in this test we use overlapping atomic writes of same io size.
Although serializing racing writes is not guaranteed for RWF_ATOMIC,
NVMe and SCSI provide this guarantee as an inseparable feature to
power-fail atomicity. Keeping the iosize as same also ensures that ext4
doesn't tear the write due to racing ioend unwritten conversion.

The value of this test is that we make sure the RWF_ATOMIC is handled
correctly by ext4 as well as test that the block layer doesn't split or
only generate multiple bios for an atomic write.

Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: John Garry <john.g.garry@oracle.com>
Signed-off-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/ext4/062 [new file with mode: 0755]
tests/ext4/062.out [new file with mode: 0644]