]> www.infradead.org Git - users/hch/xfstests-dev.git/commit
generic: increase file size to match CoW delayed allocation for XFS 64k bs
authorPankaj Raghav <p.raghav@samsung.com>
Thu, 24 Oct 2024 11:23:11 +0000 (13:23 +0200)
committerZorro Lang <zlang@kernel.org>
Fri, 25 Oct 2024 16:59:36 +0000 (00:59 +0800)
commit6d97ae8ddebf56b029a256a2292036995ec900fb
treef9a5d39c91d2061abcff95beb23e273ce1f16018
parentb71de9073a655a01941beb9e40a45c56cfd3bb38
generic: increase file size to match CoW delayed allocation for XFS 64k bs

generic/305,326,328 have been failing for 32k and 64k blocksizes.

We do the following in the test 305 and 326 (highlighting only the part
that is related to failure):

- create a 1M test-1/file1
- reflink test-1/file2 and test-1/file3 based on test-1/file1
- Overwrite first half of test-1/file2 to do a CoW operation
- Expect the size of the test-1 dir to be 3M

The test is failing for 32k and 64k blocksizes as the number of blocks
(direct + delayed) is higher than number of blocks allocated for
blocksizes < 32k in XFS, resulting in size of test-1 to be more than 3M.
Though generic/328 has a different IO pattern, the reason for failure is
the same.

This is the failure output :
    --- tests/generic/305.out   2024-06-05 11:52:27.430262812 +0000
    +++ /root/results//64k_4ks/generic/305.out.bad      2024-10-23 10:56:57.643986870 +0000
    @@ -11,7 +11,7 @@
     CoW one of the files
     root 0 0 0
     nobody 0 0 0
    -fsgqa 3072 0 0
    +fsgqa 4608 0 0
     Remount the FS to see if accounting changes
     root 0 0 0

In these tests, XFS is doing a delayed allocation of
XFS_DEFAULT_COWEXTSIZE_HINT(32). Increase the size of the file so that
the CoW write(sz/2) matches the maximum size of the delayed allocation
for the max blocksize of 64k. This will ensure that all parts of the
delayed extents are converted to real extents for all blocksizes.

Even though this is not the most complete solution to fix these tests,
the objective of these tests are to test quota and not the effect of delayed
allocations.

Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/generic/305
tests/generic/305.out
tests/generic/326
tests/generic/326.out
tests/generic/328
tests/generic/328.out