From: Christoph Hellwig <hch@lst.de>
To: Ming Lei <ming.lei@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org
Subject: Re: [PATCH 0/3] block: don't drain file system I/O on del_gendisk
Date: Tue, 18 Jan 2022 09:25:08 +0100 [thread overview]
Message-ID: <20220118082508.GB21847@lst.de> (raw)
In-Reply-To: <YeUyB/5YtA1AGyt8@T590>
On Mon, Jan 17, 2022 at 05:08:23PM +0800, Ming Lei wrote:
> > We need it to have proper life times in the block layer. Everything only
> > needed for file system I/O and not blk-mq specific should slowly move
> > from the request_queue to the gendisk and I have patches going in
> > that direction. In the end only the SCSI discovery code and the case
> > of /dev/sg without SCSI ULP will ever do passthrough I/O purely on the
> > gendisk.
> >
> > So I think this series is moving in the wrong direction. If you care
> > about no doing two freeze cycles the right thing to do is to record
>
> I just think that the extra draining point in del_gendisk() isn't useful,
> can you share any use case with this change?
SCSI disk detach for example is a place where we need it.
> > if we ever did non-disk based passthrough I/O on a requeue_queue and
> > if not simplify the request_queue cleanup. Doing this is on my TODO
> > list but I haven't look into the details yet.
> >
> > > 1) queue freezing can't drain FS I/O for bio based driver
> >
> > This is something I've started looking into it.
>
> But that is one big problem, not sure you can solve it in short time,
> also not sure if it is useful, cause FS already guaranteed that every
> IO is drained before releasing disk, or IOs in the submission task are
> drained when exiting the task.
Think of a hot unplug. The device gets a removal even, but the file
system still lives on.
> Firstly, FS layer has already guaranteed that every FS IO is done before
> releasing disk, so no need to take so much effort and make code more
> fragile to add one extra FS IO draining point in del_gendisk().
In the hot removal case the file system is still alive when del_gendisk
is called.
> Also the above two things aren't trivial enough to solve in short time, so
> can we delay the FS draining in del_gendisk() until the two are done?
We already have the draining. What are you trying to fix by removing it?
next prev parent reply other threads:[~2022-01-18 8:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-16 4:18 [PATCH 0/3] block: don't drain file system I/O on del_gendisk Ming Lei
2022-01-16 4:18 ` [PATCH 1/3] block: move freeing disk into queue's release handler Ming Lei
2022-01-18 8:22 ` Christoph Hellwig
2022-01-18 15:47 ` Ming Lei
2022-01-18 15:59 ` Ming Lei
2022-01-18 16:19 ` Christoph Hellwig
2022-01-16 4:18 ` [PATCH 2/3] block: revert aec89dc5d421 block: keep q_usage_counter in atomic mode after del_gendisk Ming Lei
2022-01-16 4:18 ` [PATCH 3/3] block: revert 8e141f9eb803 block: drain file system I/O on del_gendisk Ming Lei
2022-01-17 8:13 ` [PATCH 0/3] block: don't " Christoph Hellwig
2022-01-17 9:08 ` Ming Lei
2022-01-18 8:25 ` Christoph Hellwig [this message]
2022-01-19 9:02 ` 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=20220118082508.GB21847@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=ming.lei@redhat.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).