fio: register pvsync2 engine correctly
PATCH 1/1 fio: register pvsync2 engine correctly
I'm experimenting with the new syscalls and noticed fio's support was incomplete. This patch fixes some of those issues.
Signed-off-by Jon Derrick <[email protected]>
---
Additionally, until libc catches up, I've hacked in:
#include <unistd.h>
#include <sys/syscall.h>
#define preadv2(...) syscall(SYS_preadv2, __VA_ARGS__) #define pwritev2(...) syscall(SYS_pwritev2, __VA_ARGS__)
engines/sync.c | 6 ++++++ options.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-)
engines/sync.c +6 -0
@@ -453,6 +453,9 @@ static void fio_init fio_syncio_register(void)#ifdef CONFIG_PWRITEV register_ioengine (&ioengine_pvrw);#endif +#ifdef CONFIG_PWRITEV2 +register_ioengine (&ioengine_pvrw2); +#endif } static void fio_exit fio_syncio_unregister(void)
@@ -463,4 +466,7 @@ static void fio_exit fio_syncio_unregister(void)#ifdef CONFIG_PWRITEV unregister_ioengine (&ioengine_pvrw);#endif +#ifdef CONFIG_PWRITEV2 +unregister_ioengine (&ioengine_pvrw2); +#endif }
options.c +1 -1
@@ -1471,7 +1471,7 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { .help = "Use preadv/pwritev", },#endif -#ifdef CONFIG_PWRITEV +#ifdef CONFIG_PWRITEV2 { .ival = "pvsync2", .help = "Use preadv2/pwritev2", },
Signature · 1 line
2.5.0
Quoted 2 lines · Jon Derrick
I'm experimenting with the new syscalls and noticed fio's support was incomplete. This patch fixes some of those issues.
Thanks Jon, applied.
Signature · 1 line
Jens Axboe