X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=t%2Fio_uring.c;h=55b75f6ed9664858a7cc6155ce0c159a146a4479;hb=HEAD;hp=6fc40cbb671ded906e132bbda9ffc689f52442fb;hpb=1a6bc51a70e450546727502d96fe3317c1d2616f;p=fio.git diff --git a/t/io_uring.c b/t/io_uring.c index 6fc40cbb..aa6e09e9 100644 --- a/t/io_uring.c +++ b/t/io_uring.c @@ -820,7 +820,7 @@ static void set_affinity(struct submitter *s) #endif } -static int detect_node(struct submitter *s, const char *name) +static int detect_node(struct submitter *s, char *name) { #ifdef CONFIG_LIBNUMA const char *base = basename(name); @@ -974,7 +974,9 @@ static int setup_ring(struct submitter *s) for (i = 0; i < p.sq_entries; i++) sring->array[i] = i; - s->per_file_depth = (depth + s->nr_files - 1) / s->nr_files; + s->per_file_depth = INT_MAX; + if (s->nr_files) + s->per_file_depth = (depth + s->nr_files - 1) / s->nr_files; return 0; }