From: Jens Axboe Date: Fri, 11 Mar 2022 02:09:56 +0000 (-0700) Subject: t/io_uring: only enable sync if we have preadv2 X-Git-Tag: fio-3.30~13 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=a7648136bd2ee4cdb38489c62016f5cd86d9fce7;p=fio.git t/io_uring: only enable sync if we have preadv2 Signed-off-by: Jens Axboe --- diff --git a/t/io_uring.c b/t/io_uring.c index 157eea9e..10035912 100644 --- a/t/io_uring.c +++ b/t/io_uring.c @@ -939,6 +939,7 @@ submit: return NULL; } +#ifdef CONFIG_PWRITEV2 static void *submitter_sync_fn(void *data) { struct submitter *s = data; @@ -1004,6 +1005,13 @@ static void *submitter_sync_fn(void *data) finish = 1; return NULL; } +#else +static void *submitter_sync_fn(void *data) +{ + finish = 1; + return NULL; +} +#endif static struct submitter *get_submitter(int offset) { @@ -1346,7 +1354,12 @@ int main(int argc, char *argv[]) register_ring = !!atoi(optarg); break; case 'S': +#ifdef CONFIG_PWRITEV2 use_sync = !!atoi(optarg); +#else + fprintf(stderr, "preadv2 not supported\n"); + exit(1); +#endif break; case 'h': case '?':