[PATCH blktests 2/2] nvme/049: add fio md_per_io_size option
Shin'ichiro Kawasaki
shinichiro.kawasaki at wdc.com
Wed Jun 25 04:45:05 PDT 2025
When TEST_DEV namespace has a format with metadata, fio workloads with
io_uring_cmd engine errors out with the message "md_per_io_size should
be at least 64 bytes". To avoid the failure, add the option
--md_per_io_size to the fio workloads.
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki at wdc.com>
Cc: Kanchan Joshi <joshi.k at samsung.com>
---
tests/nvme/049 | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/tests/nvme/049 b/tests/nvme/049
index 7304d66..70a6d11 100755
--- a/tests/nvme/049
+++ b/tests/nvme/049
@@ -15,6 +15,15 @@ requires() {
_have_fio_ver 3 33
}
+metadata_bytes_per_4k_io() {
+ local phys_bs md_bytes
+
+ phys_bs=$(<"${TEST_DEV_SYSFS}"/queue/physical_block_size)
+ md_bytes=$(<"${TEST_DEV_SYSFS}"/metadata_bytes)
+
+ echo $((4096 * md_bytes / phys_bs))
+}
+
test_device() {
echo "Running ${TEST_NAME}"
@@ -23,6 +32,7 @@ test_device() {
local target_size=4096
local common_args=()
local fio_output
+ local md_io_bytes
test_dev_bs=$(_min_io "$ngdev")
common_args=(
@@ -39,6 +49,9 @@ test_device() {
--runtime=2
)
+ md_io_bytes=$(metadata_bytes_per_4k_io)
+ ((md_io_bytes)) && common_args+=(--md_per_io_size="${md_io_bytes}")
+
((test_dev_bs > target_size)) && target_size=$test_dev_bs
# check security permission
--
2.49.0
More information about the Linux-nvme
mailing list