lkml.org 
[lkml]   [2023]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH blktests v3 04/12] common/xfs: Limit fio size job to fit into xfs fs
Date
The usable capacity of the filesystem is less than the raw
partition/device size due to the additional meta/log data.

Ensure that the job size for fio is not exceeding the limits.

Because we have hard coded the path where we mount the filesystem
and don't want to expose this, we just update max size inside
_xfs_run_fio_verify_io(). No need to leak this into the caller.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
common/xfs | 3 +++
1 file changed, 3 insertions(+)

diff --git a/common/xfs b/common/xfs
index 413c2820ffaf..37ce85878df2 100644
--- a/common/xfs
+++ b/common/xfs
@@ -37,6 +37,9 @@ _xfs_run_fio_verify_io() {
sz_mb="${avail_mb}"
else
sz_mb="$(convert_to_mb "${sz}")"
+ if [[ "${sz_mb}" -gt "${avail_mb}" ]]; then
+ sz_mb="${avail_mb}"
+ fi
fi

_run_fio_verify_io --size="${sz_mb}m" --directory="${mount_dir}/"
--
2.40.0
\
 
 \ /
  Last update: 2023-05-03 10:04    [W:0.166 / U:1.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site