mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
172b311e6f
xfs/{529,531,532,534,535} attempt to create test files after injecting
reduce_max_iextents error tag. Creation of test files fails when using a
multi-block directory test configuration because,
1. A directory can have a pseudo maximum extent count of 10.
2. In the worst case a directory entry creation operation can consume
(XFS_DA_NODE_MAXDEPTH + 1 + 1) * (Nr fs blocks in a single directory block)
extents.
With 1k fs block size and 4k directory block size, this evaluates to,
(5 + 1 + 1) * 4
= 7 * 4
= 28
> 10 (Pseudo maximum inode extent count).
This commit fixes the issue by creating test files before injecting
reduce_max_iextents error tag.
Reported-by: Darrick J. Wong <djwong@kernel.org>
Suggested-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandanrlinux@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
15 lines
505 B
Plaintext
15 lines
505 B
Plaintext
QA output created by 535
|
|
Format and mount fs
|
|
Inject reduce_max_iextents error tag
|
|
Create a $srcfile having an extent of length 15 blocks
|
|
* Write to shared extent
|
|
Share the extent with $dstfile
|
|
Buffered write to every other block of $dstfile's shared extent
|
|
Verify $dstfile's extent count
|
|
Disable reduce_max_iextents error tag
|
|
* Funshare shared extent
|
|
Inject reduce_max_iextents error tag
|
|
Share the extent with $dstfile
|
|
Funshare every other block of $dstfile's shared extent
|
|
Verify $dstfile's extent count
|