io_uring: ensure accurate real_file_size setup for full device access with PI enabled
authorsuho.son <suho.son@samsung.com>
Mon, 23 Jun 2025 02:18:12 +0000 (11:18 +0900)
committersuho.son <suho.son@samsung.com>
Mon, 23 Jun 2025 02:18:12 +0000 (11:18 +0900)
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 <suho.son@samsung.com>

engines/io_uring.c

index 512280377434b368077a80dbd8aec878cb9ebc82..c87e1cd4e915966457c3a92b79b383d7850c0dab 100644 (file)
@@ -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);