bdev/nvme: Add thread pointer to struct nvme_bdev_ctrlr

Add thread pointer to struct nvme_bdev_ctrlr. The thread which
created nvme_bdev_ctrlr is set to the pointer.

The thread pointer will be used to limit only one thread to submit
admin abort.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia39d5cbc7a13b0e0022c0d5591069ea8776ef774
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3244
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
Shuhei Matsumoto 2020-07-08 17:02:36 +09:00 committed by Tomasz Zawadzki
parent 9d6bb6decc
commit 613c9386ff
2 changed files with 2 additions and 0 deletions

View File

@ -1389,6 +1389,7 @@ create_ctrlr(struct spdk_nvme_ctrlr *ctrlr,
}
}
nvme_bdev_ctrlr->thread = spdk_get_thread();
nvme_bdev_ctrlr->adminq_timer_poller = NULL;
nvme_bdev_ctrlr->ctrlr = ctrlr;
nvme_bdev_ctrlr->ref = 0;

View File

@ -95,6 +95,7 @@ struct nvme_bdev_ctrlr {
struct spdk_poller *adminq_timer_poller;
struct spdk_poller *destruct_poller;
struct spdk_thread *thread;
struct ocssd_bdev_ctrlr *ocssd_ctrlr;