From acd2dd42b5c25bee89915dfbe456883324dbc6b2 Mon Sep 17 00:00:00 2001 From: "suho.son" Date: Mon, 23 Jun 2025 11:18:12 +0900 Subject: [PATCH] io_uring: ensure accurate real_file_size setup for full device access with PI enabled Fix real_file_size calculation when PI is enabled When PI is enabled, the extended LBA (lba_ext) should be used to calculate real_file_size instead of lba_size. This ensures FIO can access the entire device area correctly. Signed-off by: Suho Son --- engines/io_uring.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/engines/io_uring.c b/engines/io_uring.c index 51228037..c87e1cd4 100644 --- a/engines/io_uring.c +++ b/engines/io_uring.c @@ -1610,7 +1610,10 @@ static int fio_ioring_cmd_get_file_size(struct thread_data *td, return ret; } - f->real_file_size = data->lba_size * nlba; + if (data->lba_ext) + f->real_file_size = data->lba_ext * nlba; + else + f->real_file_size = data->lba_size * nlba; fio_file_set_size_known(f); FILE_SET_ENG_DATA(f, data); -- 2.25.1