public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH] t/io_uring: fix max_blocks calculation in nvme passthrough mode
@ 2023-04-13 10:47 Xiaoguang Wang
  2023-04-13 12:40 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Xiaoguang Wang @ 2023-04-13 10:47 UTC (permalink / raw)
  To: io-uring; +Cc: axboe, Xiaoguang Wang

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(-)

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;
-- 
2.19.1.6.gb485710b


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] t/io_uring: fix max_blocks calculation in nvme passthrough mode
  2023-04-13 10:47 [PATCH] t/io_uring: fix max_blocks calculation in nvme passthrough mode Xiaoguang Wang
@ 2023-04-13 12:40 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2023-04-13 12:40 UTC (permalink / raw)
  To: io-uring, Xiaoguang Wang


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,
-- 
Jens Axboe




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-13 12:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-13 10:47 [PATCH] t/io_uring: fix max_blocks calculation in nvme passthrough mode Xiaoguang Wang
2023-04-13 12:40 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox