bdev/nvme: Change parameter of nvme_ctrlr_depopulate_namespace_done() from ctrlr to ns
The following patches will need to update nvme_bdev_ns at nvme_ctrlr_depopulate_namespace_done(). nvme_bdev_ctrlr can be got from nvme_bdev_ns, and so this change will cause no issue. Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I7cbfe0d936a3a757a8792fdf842e1228b2df05e6 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4531 Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
5f523c44f0
commit
b2c29e91c5
@ -1293,8 +1293,10 @@ timeout_cb(void *cb_arg, struct spdk_nvme_ctrlr *ctrlr,
|
||||
}
|
||||
|
||||
void
|
||||
nvme_ctrlr_depopulate_namespace_done(struct nvme_bdev_ctrlr *nvme_bdev_ctrlr)
|
||||
nvme_ctrlr_depopulate_namespace_done(struct nvme_bdev_ns *nvme_ns)
|
||||
{
|
||||
struct nvme_bdev_ctrlr *nvme_bdev_ctrlr = nvme_ns->ctrlr;
|
||||
|
||||
pthread_mutex_lock(&g_bdev_nvme_mutex);
|
||||
assert(nvme_bdev_ctrlr->ref > 0);
|
||||
nvme_bdev_ctrlr->ref--;
|
||||
@ -1319,7 +1321,7 @@ nvme_ctrlr_depopulate_standard_namespace(struct nvme_bdev_ns *nvme_ns)
|
||||
|
||||
nvme_ns->populated = false;
|
||||
|
||||
nvme_ctrlr_depopulate_namespace_done(nvme_ns->ctrlr);
|
||||
nvme_ctrlr_depopulate_namespace_done(nvme_ns);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -924,7 +924,7 @@ bdev_ocssd_free_namespace(struct nvme_bdev_ns *nvme_ns)
|
||||
free(nvme_ns->type_ctx);
|
||||
nvme_ns->type_ctx = NULL;
|
||||
|
||||
nvme_ctrlr_depopulate_namespace_done(nvme_ns->ctrlr);
|
||||
nvme_ctrlr_depopulate_namespace_done(nvme_ns);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -155,7 +155,7 @@ struct nvme_io_channel {
|
||||
|
||||
void nvme_ctrlr_populate_namespace_done(struct nvme_async_probe_ctx *ctx,
|
||||
struct nvme_bdev_ns *nvme_ns, int rc);
|
||||
void nvme_ctrlr_depopulate_namespace_done(struct nvme_bdev_ctrlr *nvme_bdev_ctrlr);
|
||||
void nvme_ctrlr_depopulate_namespace_done(struct nvme_bdev_ns *nvme_ns);
|
||||
|
||||
struct nvme_bdev_ctrlr *nvme_bdev_ctrlr_get(const struct spdk_nvme_transport_id *trid);
|
||||
struct nvme_bdev_ctrlr *nvme_bdev_ctrlr_get_by_name(const char *name);
|
||||
|
@ -195,8 +195,10 @@ nvme_ctrlr_populate_namespace_done(struct nvme_async_probe_ctx *ctx,
|
||||
}
|
||||
|
||||
void
|
||||
nvme_ctrlr_depopulate_namespace_done(struct nvme_bdev_ctrlr *ctrlr)
|
||||
nvme_ctrlr_depopulate_namespace_done(struct nvme_bdev_ns *ns)
|
||||
{
|
||||
struct nvme_bdev_ctrlr *ctrlr = ns->ctrlr;
|
||||
|
||||
CU_ASSERT(ctrlr->ref > 0);
|
||||
ctrlr->ref--;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user