fio_plugin: fix the wrong usage of queue pair data structure in fio thread
If multiple numjobs and filename were used in fio tests, one thread may have a list of queue pairs, so we should store the queue pair when submitting a new request. Change-Id: I585cd40ea4295b94c8766f9adfa5a7344cb0bc3c Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447272 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
50c48ee92d
commit
030fb5e2bb
@ -72,6 +72,7 @@ struct spdk_fio_request {
|
||||
struct spdk_dif_ctx dif_ctx;
|
||||
|
||||
struct spdk_fio_thread *fio_thread;
|
||||
struct spdk_fio_qpair *fio_qpair;
|
||||
};
|
||||
|
||||
struct spdk_fio_ctrlr {
|
||||
@ -592,9 +593,10 @@ static void spdk_fio_completion_cb(void *ctx, const struct spdk_nvme_cpl *cpl)
|
||||
{
|
||||
struct spdk_fio_request *fio_req = ctx;
|
||||
struct spdk_fio_thread *fio_thread = fio_req->fio_thread;
|
||||
struct spdk_fio_qpair *fio_qpair = fio_req->fio_qpair;
|
||||
|
||||
if (fio_thread->fio_qpair->do_nvme_pi) {
|
||||
fio_extended_lba_verify_pi(fio_thread->fio_qpair, fio_req->io);
|
||||
if (fio_qpair->do_nvme_pi) {
|
||||
fio_extended_lba_verify_pi(fio_qpair, fio_req->io);
|
||||
}
|
||||
|
||||
assert(fio_thread->iocq_count < fio_thread->iocq_size);
|
||||
@ -658,6 +660,7 @@ spdk_fio_queue(struct thread_data *td, struct io_u *io_u)
|
||||
if (fio_qpair == NULL || ns == NULL) {
|
||||
return -ENXIO;
|
||||
}
|
||||
fio_req->fio_qpair = fio_qpair;
|
||||
|
||||
block_size = spdk_nvme_ns_get_extended_sector_size(ns);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user