From 154d27e6b6d51461db4869d80a7e5b9f8fb1d93f Mon Sep 17 00:00:00 2001 From: Ankit Kumar Date: Wed, 12 Jul 2023 15:50:39 +0530 Subject: [PATCH] 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 --- fdp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.25.1