public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@meta.com>
To: <axboe@kernel.dk>, <io-uring@vger.kernel.org>
Cc: Keith Busch <kbusch@kernel.org>
Subject: [PATCH] io_uring/fdinfo: show SQEs for no array setup
Date: Wed, 22 Oct 2025 13:56:07 -0700	[thread overview]
Message-ID: <20251022205607.4035359-1-kbusch@meta.com> (raw)

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


             reply	other threads:[~2025-10-22 20:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-22 20:56 Keith Busch [this message]
2025-10-22 22:09 ` [PATCH] io_uring/fdinfo: show SQEs for no array setup Jens Axboe
2025-10-22 22:10 ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251022205607.4035359-1-kbusch@meta.com \
    --to=kbusch@meta.com \
    --cc=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    --cc=kbusch@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox