bdev/nvme: Inline nvme_bdev_to_bdev_ns() and remove it
It is unlikely that managing namespaces by nvme_bdev is complicated. Hence we do not need the helper function nvme_bdev_to_bdev_ns(). Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I77b4dcd12b2f2a219f58e5bc7b7e51dd10635da4 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8118 Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot
This commit is contained in:
parent
d4558c6132
commit
a3f581e83b
@ -941,7 +941,7 @@ bdev_nvme_io_type_supported(void *ctx, enum spdk_bdev_io_type io_type)
|
||||
struct spdk_nvme_ctrlr *ctrlr;
|
||||
const struct spdk_nvme_ctrlr_data *cdata;
|
||||
|
||||
nvme_ns = nvme_bdev_to_bdev_ns(nbdev);
|
||||
nvme_ns = nbdev->nvme_ns;
|
||||
assert(nvme_ns != NULL);
|
||||
ns = nvme_ns->ns;
|
||||
ctrlr = spdk_nvme_ns_get_ctrlr(ns);
|
||||
@ -1179,7 +1179,7 @@ bdev_nvme_dump_info_json(void *ctx, struct spdk_json_write_ctx *w)
|
||||
union spdk_nvme_csts_register csts;
|
||||
char buf[128];
|
||||
|
||||
nvme_ns = nvme_bdev_to_bdev_ns(nvme_bdev);
|
||||
nvme_ns = nvme_bdev->nvme_ns;
|
||||
assert(nvme_ns != NULL);
|
||||
ns = nvme_ns->ns;
|
||||
ctrlr = spdk_nvme_ns_get_ctrlr(ns);
|
||||
|
@ -199,10 +199,4 @@ bdev_nvme_find_admin_path(struct nvme_io_channel *nvme_ch,
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline struct nvme_bdev_ns *
|
||||
nvme_bdev_to_bdev_ns(struct nvme_bdev *nbdev)
|
||||
{
|
||||
return nbdev->nvme_ns;
|
||||
}
|
||||
|
||||
#endif /* SPDK_COMMON_BDEV_NVME_H */
|
||||
|
Loading…
Reference in New Issue
Block a user