nvme: use spdk_nvme_zns_ns_get_zone_size_sectors() where appropriate
Use the new function spdk_nvme_zns_ns_get_zone_size_sectors() where it is appropriate (in comparison to the existing spdk_nvme_zns_ns_get_zone_size() variant). Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com> Change-Id: Ic929ffbc5a1f4a16ba6719a985c05ae625caed46 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6417 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
9a800c38f5
commit
b1b4b8676f
@ -736,7 +736,7 @@ get_and_print_zns_zone_report(struct spdk_nvme_ns *ns, struct spdk_nvme_qpair *q
|
||||
{
|
||||
struct spdk_nvme_zns_zone_report *report_buf;
|
||||
size_t report_bufsize;
|
||||
uint64_t zone_size_lba = spdk_nvme_zns_ns_get_zone_size(ns) / spdk_nvme_ns_get_sector_size(ns);
|
||||
uint64_t zone_size_lba = spdk_nvme_zns_ns_get_zone_size_sectors(ns);
|
||||
uint64_t total_zones = spdk_nvme_zns_ns_get_num_zones(ns);
|
||||
uint64_t max_zones_per_buf, zones_to_print, i;
|
||||
uint64_t handled_zones = 0;
|
||||
|
@ -57,7 +57,7 @@ spdk_nvme_zns_ns_get_zone_size(struct spdk_nvme_ns *ns)
|
||||
uint64_t
|
||||
spdk_nvme_zns_ns_get_num_zones(struct spdk_nvme_ns *ns)
|
||||
{
|
||||
return spdk_nvme_ns_get_size(ns) / spdk_nvme_zns_ns_get_zone_size(ns);
|
||||
return spdk_nvme_ns_get_num_sectors(ns) / spdk_nvme_zns_ns_get_zone_size_sectors(ns);
|
||||
}
|
||||
|
||||
const struct spdk_nvme_zns_ctrlr_data *
|
||||
|
Loading…
Reference in New Issue
Block a user