]> git.baikalelectronics.ru Git - kernel.git/commit
block: simplify disk shutdown
authorChristoph Hellwig <hch@lst.de>
Sun, 19 Jun 2022 06:05:51 +0000 (08:05 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 28 Jun 2022 12:30:26 +0000 (06:30 -0600)
commit26f4c184133c5a5423442b6b5ebdabbfc344435a
tree6d945fbe71814027c249acb00b86c6f35e6adfda
parent83d0245a489406ec9d72c77ebc1cfe200dfb1f6a
block: simplify disk shutdown

Set the queue dying flag and call blk_mq_exit_queue from del_gendisk for
all disks that do not have separately allocated queues, and thus remove
the need to call blk_cleanup_queue for them.

Rename blk_cleanup_disk to blk_mq_destroy_queue to make it clear that
this function is intended only for separately allocated blk-mq queues.

This saves an extra queue freeze for devices without a separately
allocated queue.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Link: https://lore.kernel.org/r/20220619060552.1850436-6-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
34 files changed:
block/blk-core.c
block/blk-mq.c
block/blk-sysfs.c
block/blk.h
block/bsg-lib.c
block/genhd.c
drivers/block/ataflop.c
drivers/block/loop.c
drivers/block/mtip32xx/mtip32xx.c
drivers/block/rnbd/rnbd-clt.c
drivers/block/sx8.c
drivers/block/virtio_blk.c
drivers/block/z2ram.c
drivers/cdrom/gdrom.c
drivers/memstick/core/ms_block.c
drivers/memstick/core/mspro_block.c
drivers/mmc/core/block.c
drivers/mmc/core/queue.c
drivers/nvme/host/apple.c
drivers/nvme/host/core.c
drivers/nvme/host/fc.c
drivers/nvme/host/pci.c
drivers/nvme/host/rdma.c
drivers/nvme/host/tcp.c
drivers/nvme/target/loop.c
drivers/s390/block/dasd.c
drivers/s390/block/dasd_genhd.c
drivers/scsi/scsi_lib.c
drivers/scsi/scsi_sysfs.c
drivers/scsi/sd.c
drivers/scsi/sr.c
drivers/ufs/core/ufshcd.c
include/linux/blk-mq.h
include/linux/blkdev.h