public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Caleb Sander Mateos <csander@purestorage.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	Uday Shankar <ushankar@purestorage.com>,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 6/8] ublk: don't call ublk_dispatch_req() for NEED_GET_DATA
Date: Sun, 27 Apr 2025 21:10:45 +0800	[thread overview]
Message-ID: <aA4s1eF0EqZRoNoj@fedora> (raw)
In-Reply-To: <20250427045803.772972-7-csander@purestorage.com>

On Sat, Apr 26, 2025 at 10:58:01PM -0600, Caleb Sander Mateos wrote:
> ublk_dispatch_req() currently handles 3 different cases: incoming ublk
> requests that don't need to wait for a data buffer, incoming requests
> that do need to wait for a buffer, and resuming those requests once the
> buffer is provided. But the call site that provides a data buffer
> (UBLK_IO_NEED_GET_DATA) is separate from those for incoming requests.
> 
> So simplify the function by splitting the UBLK_IO_NEED_GET_DATA case
> into its own function ublk_get_data(). This avoids several redundant
> checks in the UBLK_IO_NEED_GET_DATA case, and streamlines the incoming
> request cases.
> 
> Don't call ublk_fill_io_cmd() for UBLK_IO_NEED_GET_DATA, as it's no
> longer necessary to set io->cmd or the UBLK_IO_FLAG_ACTIVE flag for
> ublk_dispatch_req().
> 
> Since UBLK_IO_NEED_GET_DATA no longer relies on ublk_dispatch_req()
> calling io_uring_cmd_done(), return the UBLK_IO_RES_OK status directly
> from the ->uring_cmd() handler.
> 
> Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>

Reviewed-by: Ming Lei <ming.lei@redhat.com>

thanks,
Ming


  reply	other threads:[~2025-04-27 13:11 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-27  4:57 [PATCH 0/8] ublk: simplify NEED_GET_DATA handling and request lookup Caleb Sander Mateos
2025-04-27  4:57 ` [PATCH 1/8] ublk: factor out ublk_commit_and_fetch Caleb Sander Mateos
2025-04-27  4:57 ` [PATCH 2/8] ublk: fix "immepdately" typo in comment Caleb Sander Mateos
2025-04-27 12:58   ` Ming Lei
2025-04-27  4:57 ` [PATCH 3/8] ublk: remove misleading "ubq" in "ubq_complete_io_cmd()" Caleb Sander Mateos
2025-04-27 13:01   ` Ming Lei
2025-04-27  4:57 ` [PATCH 4/8] ublk: don't log uring_cmd cmd_op in ublk_dispatch_req() Caleb Sander Mateos
2025-04-27 13:03   ` Ming Lei
2025-04-27  4:58 ` [PATCH 5/8] ublk: factor out ublk_start_io() helper Caleb Sander Mateos
2025-04-27 13:05   ` Ming Lei
2025-04-28 14:28     ` Caleb Sander Mateos
2025-04-28 15:12       ` Caleb Sander Mateos
2025-04-29  4:05         ` Ming Lei
2025-04-29 14:55           ` Caleb Sander Mateos
2025-04-30 22:44             ` Caleb Sander Mateos
2025-04-27  4:58 ` [PATCH 6/8] ublk: don't call ublk_dispatch_req() for NEED_GET_DATA Caleb Sander Mateos
2025-04-27 13:10   ` Ming Lei [this message]
2025-04-27  4:58 ` [PATCH 7/8] ublk: check UBLK_IO_FLAG_OWNED_BY_SRV in ublk_abort_queue() Caleb Sander Mateos
2025-04-27 13:13   ` Ming Lei
2025-04-27  4:58 ` [PATCH 8/8] ublk: store request pointer in ublk_io Caleb Sander Mateos
2025-04-27 13:25   ` Ming Lei

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=aA4s1eF0EqZRoNoj@fedora \
    --to=ming.lei@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=csander@purestorage.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ushankar@purestorage.com \
    /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