test/bdev/bdevperf : Added check for ZCOPY Support

If the -Z option has been specified bdevperf checks that the bdev
module supports ZCOPY.

Signed-off-by: matthewb <matthew.burbridge@hpe.com>
Change-Id: I0bebad68090f48a1b1250afe4bc4c752c2061bfb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7352
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
matthewb 2021-04-20 00:46:28 -04:00 committed by Tomasz Zawadzki
parent 080118cd83
commit 8a7f6e71b6

View File

@ -1176,6 +1176,14 @@ _bdevperf_construct_job(void *ctx)
goto end;
}
if (g_zcopy) {
if (!spdk_bdev_io_type_supported(job->bdev, SPDK_BDEV_IO_TYPE_ZCOPY)) {
printf("Test requires ZCOPY but bdev module does not support ZCOPY\n");
g_run_rc = -ENOTSUP;
goto end;
}
}
job->ch = spdk_bdev_get_io_channel(job->bdev_desc);
if (!job->ch) {
SPDK_ERRLOG("Could not get io_channel for device %s, error=%d\n", spdk_bdev_get_name(job->bdev),