linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] block: don't drain file system I/O on del_gendisk
@ 2022-01-16  4:18 Ming Lei
  2022-01-16  4:18 ` [PATCH 1/3] block: move freeing disk into queue's release handler Ming Lei
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Ming Lei @ 2022-01-16  4:18 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-block, Christoph Hellwig, Ming Lei

Hello,

Draining FS I/O on del_gendisk() is added for just avoiding to refer to
recently added q->disk in IO path, and it isn't actually needed.

Now we can move killing disk into queue's release handler, see patch 1,
so no need to drain FS I/O on del_gendisk().

Draining FS I/O on del_gendisk() isn't reliable, see the following
cases, so revert this behavior.

1) queue freezing can't drain FS I/O for bio based driver

2) it isn't easy to move elevator/cgroup/throttle shutdown during
del_gendisk, and q->disk can still be referred in these code paths

3) the added flag of GD_DEAD may not be observed reliably in
__bio_queue_enter() because queue freezing might not imply rcu grace
period.


Ming Lei (3):
  block: move freeing disk into queue's release handler
  block: revert aec89dc5d421 block: keep q_usage_counter in atomic mode
    after del_gendisk
  block: revert 8e141f9eb803 block: drain file system I/O on del_gendisk

 block/blk-core.c      | 24 ++++++++++++------------
 block/blk-mq.c        |  9 +--------
 block/blk-sysfs.c     | 13 +++++++++++++
 block/blk.h           |  2 --
 block/genhd.c         | 31 +++++--------------------------
 include/linux/genhd.h |  1 -
 6 files changed, 31 insertions(+), 49 deletions(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-01-19  9:02 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2022-01-19  9:02       ` Ming Lei

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).