bdev/nvme: Get current thread simply by spdk_get_thread() to set bio->orig_thread
These are not performance critical and we can get the current thread simply by spdk_get_thread(). This change will make the following changes a little simpler. Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: Ide79b1275ec0122f7f9812fe53c08a83d0aafeda Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7162 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
48cf3e9bbd
commit
b3f998e58b
@ -3235,7 +3235,7 @@ bdev_nvme_admin_passthru(struct nvme_io_channel *nvme_ch, struct nvme_bdev_io *b
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
bio->orig_thread = spdk_io_channel_get_thread(spdk_io_channel_from_ctx(nvme_ch));
|
bio->orig_thread = spdk_get_thread();
|
||||||
|
|
||||||
return spdk_nvme_ctrlr_cmd_admin_raw(nvme_ch->ctrlr->ctrlr, cmd, buf,
|
return spdk_nvme_ctrlr_cmd_admin_raw(nvme_ch->ctrlr->ctrlr, cmd, buf,
|
||||||
(uint32_t)nbytes, bdev_nvme_admin_passthru_done, bio);
|
(uint32_t)nbytes, bdev_nvme_admin_passthru_done, bio);
|
||||||
@ -3327,7 +3327,7 @@ bdev_nvme_abort(struct nvme_io_channel *nvme_ch, struct nvme_bdev_io *bio,
|
|||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
bio->orig_thread = spdk_io_channel_get_thread(spdk_io_channel_from_ctx(nvme_ch));
|
bio->orig_thread = spdk_get_thread();
|
||||||
|
|
||||||
rc = spdk_nvme_ctrlr_cmd_abort_ext(nvme_ch->ctrlr->ctrlr,
|
rc = spdk_nvme_ctrlr_cmd_abort_ext(nvme_ch->ctrlr->ctrlr,
|
||||||
nvme_ch->qpair,
|
nvme_ch->qpair,
|
||||||
|
Loading…
Reference in New Issue
Block a user