fio: set FIO_DISKLESSIO flag for spdk engines
This tells fio to not try to use POSIX calls on "files" specified for an SPDK engine. Note that w/o DISKLESSIO option set, fio would figure out that "*" wasn't a real file. With this option set, we now need to explicitly set its real_file_size to 0 to tell fio to ignore it. Found by Karol Latecki - he noticed that when specifying lvols in the form "lvs/lvol" that fio would create an empty "lvs" directory. Adding this flag prevents things like this from happening. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I5d457631b122ba5eb480813ab9d8aa6578f38277 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17937 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
This commit is contained in:
parent
1103ce1d71
commit
6335d88c8a
@ -619,6 +619,10 @@ spdk_fio_setup_oat(void *_ctx)
|
|||||||
struct spdk_bdev *bdev;
|
struct spdk_bdev *bdev;
|
||||||
|
|
||||||
if (strcmp(f->file_name, "*") == 0) {
|
if (strcmp(f->file_name, "*") == 0) {
|
||||||
|
/* Explicitly set file size to 0 here to make sure fio doesn't try to
|
||||||
|
* actually send I/O to this "*" file.
|
||||||
|
*/
|
||||||
|
f->real_file_size = 0;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1436,7 +1440,7 @@ static struct fio_option options[] = {
|
|||||||
struct ioengine_ops ioengine = {
|
struct ioengine_ops ioengine = {
|
||||||
.name = "spdk_bdev",
|
.name = "spdk_bdev",
|
||||||
.version = FIO_IOOPS_VERSION,
|
.version = FIO_IOOPS_VERSION,
|
||||||
.flags = FIO_RAWIO | FIO_NOEXTEND | FIO_NODISKUTIL | FIO_MEMALIGN,
|
.flags = FIO_RAWIO | FIO_NOEXTEND | FIO_NODISKUTIL | FIO_MEMALIGN | FIO_DISKLESSIO,
|
||||||
.setup = spdk_fio_setup,
|
.setup = spdk_fio_setup,
|
||||||
.init = spdk_fio_init,
|
.init = spdk_fio_init,
|
||||||
/* .prep = unused, */
|
/* .prep = unused, */
|
||||||
|
@ -1806,7 +1806,7 @@ struct ioengine_ops ioengine = {
|
|||||||
#if FIO_HAS_FDP
|
#if FIO_HAS_FDP
|
||||||
.fdp_fetch_ruhs = spdk_fio_fdp_fetch_ruhs,
|
.fdp_fetch_ruhs = spdk_fio_fdp_fetch_ruhs,
|
||||||
#endif
|
#endif
|
||||||
.flags = FIO_RAWIO | FIO_NOEXTEND | FIO_NODISKUTIL | FIO_MEMALIGN,
|
.flags = FIO_RAWIO | FIO_NOEXTEND | FIO_NODISKUTIL | FIO_MEMALIGN | FIO_DISKLESSIO,
|
||||||
.options = options,
|
.options = options,
|
||||||
.option_struct_size = sizeof(struct spdk_fio_options),
|
.option_struct_size = sizeof(struct spdk_fio_options),
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user