diff options
| author | Keith Busch <kbusch@kernel.org> | 2025-10-22 13:56:07 -0700 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2025-10-22 16:09:41 -0600 |
| commit | 0ecf0e6748120842700efc5dbf22a18580f7efcf (patch) | |
| tree | 0ee56dbd45bf6d9e5d6029eb827f92261511da9f /io_uring/fdinfo.c | |
| parent | dde92a5026d81df1a146e9c243d09b27d1bf04bf (diff) | |
io_uring/fdinfo: show SQEs for no array setup
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>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/fdinfo.c')
| -rw-r--r-- | io_uring/fdinfo.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/io_uring/fdinfo.c b/io_uring/fdinfo.c index 1a806ad16840..a3ce92183540 100644 --- a/io_uring/fdinfo.c +++ b/io_uring/fdinfo.c @@ -96,8 +96,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; |