examples/nvme/perf: check block size after IO flags
When PRACT=0, the perf tool will skip tests for extended LBA format, fix it now. Change-Id: I12e6bc10bb16148a02a30b5d20b540166d45c242 Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12053 Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Dong Yi <dongx.yi@intel.com> Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot
This commit is contained in:
parent
9da3d742ff
commit
ed9f26f9c0
@ -1210,13 +1210,6 @@ register_ns(struct spdk_nvme_ctrlr *ctrlr, struct spdk_nvme_ns *ns)
|
||||
return;
|
||||
}
|
||||
|
||||
if (g_io_size_bytes % sector_size != 0) {
|
||||
printf("WARNING: IO size %u (-o) is not a multiple of nsid %u sector size %u."
|
||||
" Removing this ns from test\n", g_io_size_bytes, spdk_nvme_ns_get_id(ns), sector_size);
|
||||
g_warn = true;
|
||||
return;
|
||||
}
|
||||
|
||||
max_xfer_size = spdk_nvme_ns_get_max_io_xfer_size(ns);
|
||||
spdk_nvme_ctrlr_get_default_io_qpair_opts(ctrlr, &opts, sizeof(opts));
|
||||
/* NVMe driver may add additional entries based on
|
||||
@ -1273,6 +1266,14 @@ register_ns(struct spdk_nvme_ctrlr *ctrlr, struct spdk_nvme_ns *ns)
|
||||
entry->block_size = spdk_nvme_ns_get_sector_size(ns);
|
||||
}
|
||||
|
||||
if (g_io_size_bytes % entry->block_size != 0) {
|
||||
printf("WARNING: IO size %u (-o) is not a multiple of nsid %u sector size %u."
|
||||
" Removing this ns from test\n", g_io_size_bytes, spdk_nvme_ns_get_id(ns), entry->block_size);
|
||||
g_warn = true;
|
||||
free(entry);
|
||||
return;
|
||||
}
|
||||
|
||||
if (g_max_io_md_size < entry->md_size) {
|
||||
g_max_io_md_size = entry->md_size;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user