example/nvme/plugin: Fix a notice error of bs
We konw bs should be extended_sector_size(ns) * num_blocks. In other words, bs should be an integral multiple of extended_sector_size. num_blocks cannot be got here, so we used integral multiple. Change-Id: Ie521db194cdad6f2d2247fd2704cab92c36ddb82 Signed-off-by: wanghailiangx <hailiangx.e.wang@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5881 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
c013ef1598
commit
0fd4c1f97c
@ -401,8 +401,8 @@ attach_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid,
|
||||
}
|
||||
|
||||
if (spdk_nvme_ns_supports_extended_lba(ns) &&
|
||||
(spdk_nvme_ns_get_extended_sector_size(ns) != td->o.bs[DDIR_READ] ||
|
||||
spdk_nvme_ns_get_extended_sector_size(ns) != td->o.bs[DDIR_WRITE])) {
|
||||
(td->o.bs[DDIR_READ] % spdk_nvme_ns_get_extended_sector_size(ns) != 0 ||
|
||||
td->o.bs[DDIR_WRITE] % spdk_nvme_ns_get_extended_sector_size(ns) != 0)) {
|
||||
SPDK_ERRLOG("--bs has to be equal to LBA data size + Metadata size\n");
|
||||
g_error = true;
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user