Message ID | 20230413104714.57703-1-xiaoguang.wang@linux.alibaba.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | t/io_uring: fix max_blocks calculation in nvme passthrough mode | expand |
On Thu, 13 Apr 2023 18:47:14 +0800, Xiaoguang Wang wrote: > 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,
diff --git a/t/io_uring.c b/t/io_uring.c index 504f8ce9..f9f4b840 100644 --- a/t/io_uring.c +++ b/t/io_uring.c @@ -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;
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 <xiaoguang.wang@linux.alibaba.com> --- t/io_uring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)