examples/fio_plugin: only enable Bit Bucket SGL with READ commands

We only enable this feature for READ commands in the NVMe driver, so
also ignore the WRITE commands in fio plugin tool.

Change-Id: Iecf43326e1a2a3b3540a1391e09a33d2443bd546
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2730
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
Changpeng Liu 2020-06-01 19:56:07 -04:00 committed by Tomasz Zawadzki
parent da0ddc351d
commit 38b80ba531

View File

@ -777,7 +777,7 @@ spdk_nvme_io_next_sge(void *ref, void **address, uint32_t *length)
iov_len = g_spdk_sge_size;
}
if (fio_req->bit_bucket_data_len < g_spdk_bit_bucket_data_len) {
if ((fio_req->bit_bucket_data_len < g_spdk_bit_bucket_data_len) && (io_u->ddir == DDIR_READ)) {
assert(g_spdk_bit_bucket_data_len < io_u->xfer_buflen);
*address = (void *)UINT64_MAX;
bit_bucket_len = g_spdk_bit_bucket_data_len - fio_req->bit_bucket_data_len;