bdev/nvme: Inline find_admin_path()
bdev_nvme_find_admin_path() is used only in a place and it's role is to find a non-failed ctrlr even after multipath is supported. Inline it into bdev_nvme_admin_passthru() will be better. Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: If58507c49b43d047e1f3ef25bbdfb571c36a1956 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9194 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Dong Yi <dongx.yi@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@gmail.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com>
This commit is contained in:
parent
2ee6ab36f9
commit
d3d6f74ca1
@ -479,14 +479,6 @@ bdev_nvme_find_io_path(struct nvme_bdev_channel *nbdev_ch,
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline bool
|
||||
bdev_nvme_find_admin_path(struct nvme_bdev_channel *nbdev_ch,
|
||||
struct nvme_ctrlr **_nvme_ctrlr)
|
||||
{
|
||||
*_nvme_ctrlr = nbdev_ch->ctrlr_ch->ctrlr;
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline void
|
||||
bdev_nvme_io_complete_nvme_status(struct nvme_bdev_io *bio,
|
||||
const struct spdk_nvme_cpl *cpl)
|
||||
@ -3838,9 +3830,7 @@ bdev_nvme_admin_passthru(struct nvme_bdev_channel *nbdev_ch, struct nvme_bdev_io
|
||||
struct nvme_ctrlr *nvme_ctrlr;
|
||||
uint32_t max_xfer_size;
|
||||
|
||||
if (!bdev_nvme_find_admin_path(nbdev_ch, &nvme_ctrlr)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
nvme_ctrlr = nbdev_ch->ctrlr_ch->ctrlr;
|
||||
|
||||
max_xfer_size = spdk_nvme_ctrlr_get_max_xfer_size(nvme_ctrlr->ctrlr);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user