diff mbox series

[blktests,2/4] common/xfs: use min io for fs blocksize

Message ID 20241218112153.3917518-3-mcgrof@kernel.org (mailing list archive)
State New
Headers show
Series enable bs > ps device testing | expand

Commit Message

Luis Chamberlain Dec. 18, 2024, 11:21 a.m. UTC
Use the min io for the target block size. Likewise we need to increase
the log size if using a bs > 4096.

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
 common/xfs | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/common/xfs b/common/xfs
index 569770fecd53..9a13258789e6 100644
--- a/common/xfs
+++ b/common/xfs
@@ -13,10 +13,16 @@  _have_xfs() {
 _xfs_mkfs_and_mount() {
 	local bdev=$1
 	local mount_dir=$2
+	local bs=$(_test_dev_min_io $bdev)
+	local xfs_logsize="64m"
+
+	if [[ $bs -gt 4096 ]]; then
+		xfs_logsize="128m"
+	fi
 
 	mkdir -p "${mount_dir}"
 	umount "${mount_dir}"
-	mkfs.xfs -l size=64m -f "${bdev}" || return $?
+	mkfs.xfs -l size=$xfs_logsize -f "${bdev}" -b size=$bs || return $?
 	mount "${bdev}" "${mount_dir}"
 }