[PATCH v2 2/4] fdp: fix placement id check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <ankit.kumar@xxxxxxxxxxx>
---
 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




[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux