From: Ankit Kumar Date: Wed, 12 Jul 2023 10:20:39 +0000 (+0530) Subject: fdp: fix placement id check X-Git-Tag: fio-3.36~66 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=154d27e6b6d51461db4869d80a7e5b9f8fb1d93f;p=fio.git fdp: fix placement id check Number of reclaim unit handle descriptors are 1 based, whereas the input placement id index / indices are 0 based. Add the correct check for that. Fixes: a7e8aae0 ("fio: add fdp support ..") Signed-off-by: Ankit Kumar Signed-off-by: Vincent Fu --- diff --git a/fdp.c b/fdp.c index b83fd660..6e124ce6 100644 --- a/fdp.c +++ b/fdp.c @@ -65,7 +65,7 @@ static int init_ruh_info(struct thread_data *td, struct fio_file *f) } for (i = 0; i < td->o.fdp_nrpli; i++) { - if (td->o.fdp_plis[i] > ruhs->nr_ruhs) { + if (td->o.fdp_plis[i] >= ruhs->nr_ruhs) { ret = -EINVAL; goto out; }