From: Caleb Sander Mateos <csander@purestorage.com>
To: Ming Lei <ming.lei@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org,
Uday Shankar <ushankar@purestorage.com>
Subject: Re: [PATCH V3 04/17] ublk: let ublk_fill_io_cmd() cover more things
Date: Tue, 15 Jul 2025 11:22:16 -0400 [thread overview]
Message-ID: <CADUfDZoY_ezThviDK4nNWgBx8XePq06UhJO+M1em83o2ebMkjw@mail.gmail.com> (raw)
In-Reply-To: <20250713143415.2857561-5-ming.lei@redhat.com>
On Sun, Jul 13, 2025 at 10:34 AM Ming Lei <ming.lei@redhat.com> wrote:
>
> Let ublk_fill_io_cmd() clear UBLK_IO_FLAG_OWNED_BY_SRV too.
>
> Signed-off-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Caleb Sander Mateos <csander@purestorage.com>
> ---
> drivers/block/ublk_drv.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c
> index 73c6c8d3b117..f251517baea3 100644
> --- a/drivers/block/ublk_drv.c
> +++ b/drivers/block/ublk_drv.c
> @@ -2014,6 +2014,8 @@ static inline void ublk_fill_io_cmd(struct ublk_io *io,
> {
> io->cmd = cmd;
> io->flags |= UBLK_IO_FLAG_ACTIVE;
> + /* now this cmd slot is owned by ublk driver */
> + io->flags &= ~UBLK_IO_FLAG_OWNED_BY_SRV;
> io->addr = buf_addr;
> }
>
> @@ -2229,9 +2231,6 @@ static int ublk_commit_and_fetch(const struct ublk_queue *ubq,
> }
>
> ublk_fill_io_cmd(io, cmd, ub_cmd->addr);
> -
> - /* now this cmd slot is owned by ublk driver */
> - io->flags &= ~UBLK_IO_FLAG_OWNED_BY_SRV;
> io->res = ub_cmd->result;
>
> if (req_op(req) == REQ_OP_ZONE_APPEND)
> @@ -2353,7 +2352,6 @@ static int __ublk_ch_uring_cmd(struct io_uring_cmd *cmd,
> */
> req = io->req;
> ublk_fill_io_cmd(io, cmd, ub_cmd->addr);
> - io->flags &= ~UBLK_IO_FLAG_OWNED_BY_SRV;
> if (likely(ublk_get_data(ubq, io, req))) {
> __ublk_prep_compl_io_cmd(io, req);
> return UBLK_IO_RES_OK;
> --
> 2.47.0
>
next prev parent reply other threads:[~2025-07-15 15:22 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-13 14:33 [PATCH V3 00/17] ublk: cleanup for supporting batch IO command Ming Lei
2025-07-13 14:33 ` [PATCH V3 01/17] ublk: validate ublk server pid Ming Lei
2025-07-15 14:50 ` Caleb Sander Mateos
2025-07-15 15:42 ` Ming Lei
2025-07-15 15:48 ` Caleb Sander Mateos
2025-07-15 22:39 ` Ming Lei
2025-07-13 14:33 ` [PATCH V3 02/17] ublk: look up ublk task via its pid in timeout handler Ming Lei
2025-07-13 14:33 ` [PATCH V3 03/17] ublk: move fake timeout logic into __ublk_complete_rq() Ming Lei
2025-07-13 14:33 ` [PATCH V3 04/17] ublk: let ublk_fill_io_cmd() cover more things Ming Lei
2025-07-15 15:22 ` Caleb Sander Mateos [this message]
2025-07-13 14:34 ` [PATCH V3 05/17] ublk: avoid to pass `struct ublksrv_io_cmd *` to ublk_commit_and_fetch() Ming Lei
2025-07-13 14:34 ` [PATCH V3 06/17] ublk: move auto buffer register handling into one dedicated helper Ming Lei
2025-07-13 14:34 ` [PATCH V3 07/17] ublk: store auto buffer register data into `struct ublk_io` Ming Lei
2025-07-13 14:34 ` [PATCH V3 08/17] ublk: add helper ublk_check_fetch_buf() Ming Lei
2025-07-13 14:34 ` [PATCH V3 09/17] ublk: remove ublk_commit_and_fetch() Ming Lei
2025-07-15 15:38 ` Caleb Sander Mateos
2025-07-13 14:34 ` [PATCH V3 10/17] ublk: pass 'const struct ublk_io *' to ublk_[un]map_io() Ming Lei
2025-07-13 14:34 ` [PATCH V3 11/17] selftests: ublk: remove `tag` parameter of ->tgt_io_done() Ming Lei
2025-07-13 14:34 ` [PATCH V3 12/17] selftests: ublk: pass 'ublk_thread *' to ->queue_io() and ->tgt_io_done() Ming Lei
2025-07-13 14:34 ` [PATCH V3 13/17] selftests: ublk: pass 'ublk_thread *' to more common helpers Ming Lei
2025-07-13 14:34 ` [PATCH V3 14/17] selftests: ublk: remove ublk queue self-defined flags Ming Lei
2025-07-13 14:34 ` [PATCH V3 15/17] selftests: ublk: improve flags naming Ming Lei
2025-07-13 14:34 ` [PATCH V3 16/17] selftests: ublk: add helper ublk_handle_uring_cmd() for handle ublk command Ming Lei
2025-07-13 14:34 ` [PATCH V3 17/17] selftests: ublk: add utils.h Ming Lei
2025-07-15 14:07 ` [PATCH V3 00/17] ublk: cleanup for supporting batch IO command 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=CADUfDZoY_ezThviDK4nNWgBx8XePq06UhJO+M1em83o2ebMkjw@mail.gmail.com \
--to=csander@purestorage.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=ming.lei@redhat.com \
--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;
as well as URLs for NNTP newsgroup(s).