Skip to contentSkip to conversation

fio: register pvsync2 engine correctly

PATCH In review Jon Derrick 2 participants 2 messages Mar 30, 2016 – Apr 2, 2016

lore
Share & tools
lore
#0 lore raw

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.

---
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
index 0b0d1a7..260ef66 100644
@@ -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
index 062abb4..b6c980e 100644
@@ -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
#1 lore raw
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