From: Ziyang Zhang <[email protected]>
To: Ming Lei <[email protected]>
Cc: [email protected], [email protected],
[email protected], Jens Axboe <[email protected]>,
Gabriel Krisman Bertazi <[email protected]>,
Xiaoguang Wang <[email protected]>
Subject: Re: [PATCH V5 1/2] ublk_drv: add io_uring based userspace block driver
Date: Fri, 15 Jul 2022 14:07:17 +0800 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <YtDLSdwbV/utn0Qv@T590>
On 2022/7/15 10:04, Ming Lei wrote:
> On Thu, Jul 14, 2022 at 09:23:40PM +0800, Ziyang Zhang wrote:
>> On 2022/7/14 18:48, Ming Lei wrote:
>>> On Thu, Jul 14, 2022 at 06:20:38PM +0800, Ziyang Zhang wrote:
>>>> On 2022/7/13 22:07, Ming Lei wrote:
>>>>> This is the driver part of userspace block driver(ublk driver), the other
>>>>> part is userspace daemon part(ublksrv)[1].
>>>>>
...
>>
>> Put it together:
>>
>> When daemon is PF_EXITING:
>>
>> 1) current ublk_io: aborted immediately in task_work
>
> Precisely it is just that ublk io request is ended immediately, so io->flags
> won't be touched.
>
>>
>> 2) UBLK_IO_FLAG_ACTIVE set: aborted in ublk_daemon_monitor_work
>
> This part is important for making forward progress, that is why it has
> to be done in a wq context.
>
>>
>> 3) UBLK_IO_FLAG_ACTIVE unset: send cqe with UBLK_IO_RES_ABORT
Oh... sorry for one mistake. case 2) and 3) should be swapped:
ublk_daemon_monitor_work(): abort blk-mq IOs if UBLK_IO_FLAG_ACTIVE is unset
ublk_cancel_queue(): send cqes with UBLK_IO_RES_ABORT if UBLK_IO_FLAG_ACTIVE is set
next prev parent reply other threads:[~2022-07-15 6:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-13 14:07 [PATCH V5 0/2] ublk: add io_uring based userspace block driver Ming Lei
2022-07-13 14:07 ` [PATCH V5 1/2] ublk_drv: " Ming Lei
2022-07-14 10:20 ` Ziyang Zhang
2022-07-14 10:48 ` Ming Lei
2022-07-14 13:23 ` Ziyang Zhang
2022-07-15 2:04 ` Ming Lei
2022-07-15 6:07 ` Ziyang Zhang [this message]
2022-07-13 14:07 ` [PATCH V5 2/2] ublk_drv: support to complete io command via task_work_add Ming Lei
2022-07-13 20:25 ` [PATCH V5 0/2] ublk: add io_uring based userspace block driver Jens Axboe
2022-07-14 0:19 ` Ming Lei
2022-07-14 2:54 ` Jens Axboe
2022-07-14 2:59 ` Jens Axboe
2022-07-14 5:30 ` Ming Lei
2022-07-19 10:15 ` Geert Uytterhoeven
2022-07-14 2:54 ` Jens Axboe
2022-07-14 14:41 ` Gabriel Krisman Bertazi
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=6723190a-e317-2161-d93e-71f8c2f88232@linux.alibaba.com \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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