On Jan 24, 2022 / 20:10, Shin'ichiro Kawasaki wrote: > When generic/204 is run for btrfs-zoned filesystem on zoned block devices with > GB size order, it takes very long time to complete. The test case creates 115MiB > filesystem on the scratch device and fills files in it within decent run time. > However, with btrfs-zoned condition, the test case creates filesystem as large > as the device size and it takes very long time to fill it all. Three causes were > identified for the long run time, and this series addresses them. > > The first cause is mixed mode option that _scratch_mkfs_sized helper function > adds to mkfs.btrfs. This option was added for both regular btrfs and > zoned-btrfs. However, zoned-btrfs does not support mixed mode. The mkfs with > mixed mode fails and results in _scratch_mkfs_sized failure. The mixed mode > shall not be specified for btrfs-zoned filesystem. > > The second cause is no check of return code from _scratch_mkfs_sized. The test > case generic/204 calls both _scratch_mkfs and _scratch_mkfs_sized, and does not > check return code from them. If _scratch_mkfs succeeds and _scratch_mkfs_sized > fails, the scratch device still has valid filesystem created by _scratch_mkfs. > Following test workload can be executed without failure, but the filesystem > does not have the size specified for _scratch_mkfs_sized. The return code of > _scratch_mkfs_sized shall be checked to catch the mkfs failure. > > The third cause is unnecessary call of the _scratch_mkfs helper function in the > test case generic/204. This helper function is called together with _filter_mkfs > helper function to obtain block size of the test target filesystem. However, the > _filter_mkfs function works only for xfs, and does nothing for other filesystems > including btrfs. Such preparation unique to xfs shall be done only for xfs. > > In this series, the first patch addresses the first cause. Following three > patches address the second cause. They cover not only generic/204 but also > other test cases which have the same problem. The last three patches address the > third problem. Two of them are preparation patches to clarify that the function > _filter_mkfs is xfs unique. And the last patch modifies generic/204 so that xfs > unique test preparation are run only for xfs. > > Shin'ichiro Kawasaki (7): > common/rc: fix btrfs mixed mode usage in _scratch_mkfs_sized > generic/{171,172,173,174,204}: check _scratch_mkfs_sized return code > ext4/021: check _scratch_mkfs_sized return code > xfs/015: check _scratch_mkfs_sized return code > common: rename _filter_mkfs to _xfs_filter_mkfs > common: move _xfs_filter_mkfs from common/filter to common/xfs > generic/204: do xfs unique preparation only for xfs This is a gentle reminder to ask review by fstests community. Let me add CC to linux-btrfs list, since the first patch is for btrfs testing. -- Best Regards, Shin'ichiro Kawasaki