From 38b80ba53131f7ab692694eb6d30d15de36a2e10 Mon Sep 17 00:00:00 2001 From: Changpeng Liu Date: Mon, 1 Jun 2020 19:56:07 -0400 Subject: [PATCH] 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 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2730 Tested-by: SPDK CI Jenkins Community-CI: Mellanox Build Bot Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto --- examples/nvme/fio_plugin/fio_plugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/nvme/fio_plugin/fio_plugin.c b/examples/nvme/fio_plugin/fio_plugin.c index a5edba064..f1e18af6b 100644 --- a/examples/nvme/fio_plugin/fio_plugin.c +++ b/examples/nvme/fio_plugin/fio_plugin.c @@ -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;