From: Ming Lei <ming.lei@redhat.com>
To: ZiyangZhang <ZiyangZhang@linux.alibaba.com>
Cc: axboe@kernel.dk, xiaoguang.wang@linux.alibaba.com,
linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
joseph.qi@linux.alibaba.com
Subject: Re: [RESEND PATCH V5 4/7] ublk_drv: consider recovery feature in aborting mechanism
Date: Fri, 23 Sep 2022 21:48:15 +0800 [thread overview]
Message-ID: <Yy25H0pnzOIEYcAY@T590> (raw)
In-Reply-To: <20220923061505.52007-5-ZiyangZhang@linux.alibaba.com>
On Fri, Sep 23, 2022 at 02:15:02PM +0800, ZiyangZhang wrote:
> With USER_RECOVERY feature enabled, the monitor_work schedules
> quiesce_work after finding a dying ubq_daemon. The monitor_work
> should also abort all rqs issued to userspace before the ubq_daemon is
> dying. The quiesce_work's job is to:
> (1) quiesce request queue.
> (2) check if there is any INFLIGHT rq. If so, we retry until all these
> rqs are requeued and become IDLE. These rqs should be requeued by
> ublk_queue_rq(), task work, io_uring fallback wq or monitor_work.
> (3) complete all ioucmds by calling io_uring_cmd_done(). We are safe to
> do so because no ioucmd can be referenced now.
> (5) set ub's state to UBLK_S_DEV_QUIESCED, which means we are ready for
> recovery. This state is exposed to userspace by GET_DEV_INFO.
>
> The driver can always handle STOP_DEV and cleanup everything no matter
> ub's state is LIVE or QUIESCED. After ub's state is UBLK_S_DEV_QUIESCED,
> user can recover with new process.
>
> Note: we do not change the default behavior with reocvery feature
> disabled. monitor_work still schedules stop_work and abort inflight
> rqs. And finally ublk_device is released.
>
> Signed-off-by: ZiyangZhang <ZiyangZhang@linux.alibaba.com>
Looks fine,
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Thanks,
Ming
next prev parent reply other threads:[~2022-09-23 13:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-23 6:14 [RESEND PATCH V5 0/7] ublk_drv: add USER_RECOVERY support ZiyangZhang
2022-09-23 6:14 ` [RESEND PATCH V5 1/7] ublk_drv: check 'current' instead of 'ubq_daemon' ZiyangZhang
2022-09-23 6:15 ` [RESEND PATCH V5 2/7] ublk_drv: define macros for recovery feature and check them ZiyangZhang
2022-09-23 6:15 ` [RESEND PATCH V5 3/7] ublk_drv: requeue rqs with recovery feature enabled ZiyangZhang
2022-09-23 13:47 ` Ming Lei
2022-09-23 6:15 ` [RESEND PATCH V5 4/7] ublk_drv: consider recovery feature in aborting mechanism ZiyangZhang
2022-09-23 13:48 ` Ming Lei [this message]
2022-09-23 6:15 ` [RESEND PATCH V5 5/7] ublk_drv: support UBLK_F_USER_RECOVERY_REISSUE ZiyangZhang
2022-09-23 6:15 ` [RESEND PATCH V5 6/7] ublk_drv: add START_USER_RECOVERY and END_USER_RECOVERY support ZiyangZhang
2022-09-23 6:34 ` Ziyang Zhang
2022-09-23 13:50 ` Ming Lei
2022-09-23 6:15 ` [RESEND PATCH V5 7/7] Documentation: document ublk user recovery feature ZiyangZhang
2022-09-23 13:58 ` 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=Yy25H0pnzOIEYcAY@T590 \
--to=ming.lei@redhat.com \
--cc=ZiyangZhang@linux.alibaba.com \
--cc=axboe@kernel.dk \
--cc=joseph.qi@linux.alibaba.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=xiaoguang.wang@linux.alibaba.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.