nvme/fio_plugin: add print_qid_mappings option
print_qid_mappings=1 will now add logging messages showing the {filename,qid} tuples associated with each job. Note that for the nvme plugin, the filename is essentially the transport ID. We just print that filename for simplicity rather than reconstructing a transport ID string from the ctrlr object. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I9b714ac009fd16b96ed87c2c056be251009815b8 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6396 Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
d108dcf5b9
commit
06ace1efbf
@ -94,6 +94,7 @@ struct spdk_fio_options {
|
||||
int enable_vmd;
|
||||
int initial_zone_reset;
|
||||
int zone_append;
|
||||
int print_qid_mappings;
|
||||
};
|
||||
|
||||
struct spdk_fio_request {
|
||||
@ -387,6 +388,11 @@ attach_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid,
|
||||
return;
|
||||
}
|
||||
|
||||
if (fio_options->print_qid_mappings == 1) {
|
||||
log_info("job %s: %s qid %d\n", td->o.name, f->file_name,
|
||||
spdk_nvme_qpair_get_id(fio_qpair->qpair));
|
||||
}
|
||||
|
||||
fio_qpair->ns = ns;
|
||||
fio_qpair->f = f;
|
||||
fio_qpair->fio_ctrlr = fio_ctrlr;
|
||||
@ -1591,6 +1597,16 @@ static struct fio_option options[] = {
|
||||
.category = FIO_OPT_C_ENGINE,
|
||||
.group = FIO_OPT_G_INVALID,
|
||||
},
|
||||
{
|
||||
.name = "print_qid_mappings",
|
||||
.lname = "Print job-to-qid mappings",
|
||||
.type = FIO_OPT_INT,
|
||||
.off1 = offsetof(struct spdk_fio_options, print_qid_mappings),
|
||||
.def = "0",
|
||||
.help = "Print job-to-qid mappings (0=disable, 1=enable)",
|
||||
.category = FIO_OPT_C_ENGINE,
|
||||
.group = FIO_OPT_G_INVALID,
|
||||
},
|
||||
{
|
||||
.name = NULL,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user