From 0b6f2e236d0966f3f862d6c5327ebb893eaf6061 Mon Sep 17 00:00:00 2001 From: wanghailiangx Date: Thu, 21 Jan 2021 10:54:04 -0500 Subject: [PATCH] example/nvme/plugin: set bs 4160 for Extended Data LBA The original value of bs is 4096, we can rewrite it in another script. When spdk_nvme_ns_supports_extended_lba(ns) is 1, we need to test with an integer multiple value of extended_sector_size, such as 4160. Change-Id: I8257bee4f741f62597bb2bb645ee9c59cf57bf33 Signed-off-by: wanghailiangx Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6018 Tested-by: SPDK CI Jenkins Community-CI: Mellanox Build Bot Reviewed-by: Changpeng Liu Reviewed-by: Shuhei Matsumoto Reviewed-by: Aleksey Marchuk --- examples/nvme/fio_plugin/example_config.fio | 1 - test/nvme/nvme.sh | 7 ++++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/nvme/fio_plugin/example_config.fio b/examples/nvme/fio_plugin/example_config.fio index a8e62ccb9..19c972133 100644 --- a/examples/nvme/fio_plugin/example_config.fio +++ b/examples/nvme/fio_plugin/example_config.fio @@ -9,7 +9,6 @@ ramp_time=0 runtime=2 iodepth=128 rw=randrw -bs=4k [test] numjobs=1 diff --git a/test/nvme/nvme.sh b/test/nvme/nvme.sh index 926931286..8c8708e18 100755 --- a/test/nvme/nvme.sh +++ b/test/nvme/nvme.sh @@ -30,7 +30,12 @@ function nvme_fio_test() { if $SPDK_EXAMPLE_DIR/identify -r "trtype:PCIe traddr:${bdf}" | grep -E "^Number of Namespaces" - | grep -q "0" -; then continue fi - fio_nvme $PLUGIN_DIR/example_config.fio --filename="trtype=PCIe traddr=${bdf//:/.}" + if $SPDK_EXAMPLE_DIR/identify -r "trtype:PCIe traddr:${bdf}" | grep -q "Extended Data LBA"; then + bs=4160 + else + bs=4096 + fi + fio_nvme $PLUGIN_DIR/example_config.fio --filename="trtype=PCIe traddr=${bdf//:/.}" --bs="$bs" ran_fio=true done $ran_fio || (echo "No valid NVMe drive found. Failing test." && false)