t/io_uring: fix max_blocks calculation in nvme passthrough mode
PATCH 1/1 t/io_uring: fix max_blocks calculation in nvme passthrough mode
nvme_id_ns's nsze has already been counted in logical blocks, so there is no need to divide by bs.
Signed-off-by Xiaoguang Wang <[email protected]>
--- t/io_uring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
t/io_uring.c +1 -1
@@ -704,7 +704,7 @@ static int get_file_size(struct file *f) bs, lbs);return -1 ; } - f->max_blocks = nlba / bs; + f->max_blocks = nlba; f->max_size = nlba; f->lba_shift =ilog2 (lbs);return 0 ;
Signature · 1 line
2.19.1.6.gb485710b
Quoted 4 lines · Xiaoguang Wang
nvme_id_ns's nsze has already been counted in logical blocks, so there is no need to divide by bs.
Applied, thanks!
[1/1] t/io_uring: fix max_blocks calculation in nvme passthrough mode
commit: e2a4a77e483e2d40a680b57b13bb08042929df1c
Best regards,
Signature · 1 line
Jens Axboe