public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] io_uring/fdinfo: show SQEs for no array setup
@ 2025-10-22 20:56 Keith Busch
  2025-10-22 22:09 ` Jens Axboe
  2025-10-22 22:10 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: Keith Busch @ 2025-10-22 20:56 UTC (permalink / raw)
  To: axboe, io-uring; +Cc: Keith Busch

From: Keith Busch <kbusch@kernel.org>

The sq_head indicates the index directly in the submission queue when
the IORING_SETUP_NO_SQARRAY option is used, so use that instead of
skipping showing the entries.

Signed-off-by: Keith Busch <kbusch@kernel.org>
---
 io_uring/fdinfo.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/io_uring/fdinfo.c b/io_uring/fdinfo.c
index 5b26b2a97e1b9..f034786030105 100644
--- a/io_uring/fdinfo.c
+++ b/io_uring/fdinfo.c
@@ -95,8 +95,10 @@ static void __io_uring_show_fdinfo(struct io_ring_ctx *ctx, struct seq_file *m)
 		u8 opcode;
 
 		if (ctx->flags & IORING_SETUP_NO_SQARRAY)
-			break;
-		sq_idx = READ_ONCE(ctx->sq_array[sq_head & sq_mask]);
+			sq_idx = sq_head & sq_mask;
+		else
+			sq_idx = READ_ONCE(ctx->sq_array[sq_head & sq_mask]);
+
 		if (sq_idx > sq_mask)
 			continue;
 
-- 
2.47.3


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

end of thread, other threads:[~2025-10-22 22:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-22 20:56 [PATCH] io_uring/fdinfo: show SQEs for no array setup Keith Busch
2025-10-22 22:09 ` Jens Axboe
2025-10-22 22:10 ` Jens Axboe

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