nvme/fio_plugin: Set PRACT flag to the correct bit position
When the NVMe namespace is formatted with PI enabled, PRACT value is set to the bit 0 unexpectedly and cause the following error. nvme_ns_cmd.c: 447:_nvme_ns_cmd_rw: *ERROR*: io_flags 0x1 bottom 16 bits is not empty Change-Id: Ib99c7a974c6a224d4e702b54b654136f10291b18 Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-on: https://review.gerrithub.io/430874 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
This commit is contained in:
parent
49e9bfda9c
commit
25d5f26207
@ -335,6 +335,15 @@ static void parse_prchk_flags(const char *prchk_str)
|
||||
}
|
||||
}
|
||||
|
||||
static void parse_pract_flag(int pract)
|
||||
{
|
||||
if (pract == 1) {
|
||||
spdk_pract_flag = SPDK_NVME_IO_FLAGS_PRACT;
|
||||
} else {
|
||||
spdk_pract_flag = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Called once at initialization. This is responsible for gathering the size of
|
||||
* each "file", which in our case are in the form
|
||||
* 'key=value [key=value] ... ns=value'
|
||||
@ -376,7 +385,7 @@ static int spdk_fio_setup(struct thread_data *td)
|
||||
opts.mem_size = fio_options->mem_size;
|
||||
opts.shm_id = fio_options->shm_id;
|
||||
spdk_enable_sgl = fio_options->enable_sgl;
|
||||
spdk_pract_flag = fio_options->pi_act;
|
||||
parse_pract_flag(fio_options->pi_act);
|
||||
parse_prchk_flags(fio_options->pi_chk);
|
||||
if (spdk_env_init(&opts) < 0) {
|
||||
SPDK_ERRLOG("Unable to initialize SPDK env\n");
|
||||
|
Loading…
Reference in New Issue
Block a user