Clean up bdev_nvme_add_trid() by factoring out comparison of namespaces and comparison of trids into helper functions, bdev_nvme_compare_namespaces() and bdev_nvme_compare_trids(), respectively. Then rename bdev_nvme_add_trid() by bdev_nvme_add_secondary_trid(). Rename is for clarification and clean-up is for the next patch. The next patch will merge spdk_nvme_detach() and populate_namespaces_cb() into the renamed bdev_nvme_secondary_trid(). Clean-up makes the next patch simpler. One note is that checking if the type of trid is not PCIe is done by holding mutex now to prioritize clean up. Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: Idc8652329dd2c721d101a724ec1a57a66c4174a7 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7094 Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> |
||
---|---|---|
.. | ||
accel | ||
bdev | ||
blob | ||
blobfs | ||
env_dpdk | ||
event | ||
sock | ||
Makefile |