Message ID | 20250212205448.2107005-5-mcgrof@kernel.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | enable bs > ps device testing | expand |
diff --git a/common/xfs b/common/xfs index 67a3b8a97391..226fdbd1c83f 100644 --- a/common/xfs +++ b/common/xfs @@ -13,10 +13,18 @@ _have_xfs() { _xfs_mkfs_and_mount() { local bdev=$1 local mount_dir=$2 + local bs + local xfs_logsize="64m" + + bs=$(_min_io "$bdev") + + if [[ $bs -gt 4096 ]]; then + xfs_logsize="128m" + fi mkdir -p "${mount_dir}" umount "${mount_dir}" >/dev/null 2>&1 - mkfs.xfs -l size=64m -f "${bdev}" || return $? + mkfs.xfs -l size=$xfs_logsize -f "${bdev}" -b size="$bs" || return $? mount "${bdev}" "${mount_dir}" }
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 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)