aboutsummaryrefslogtreecommitdiff
path: root/block/blk-mq.c
diff options
context:
space:
mode:
authorMing Lei2021-10-26 18:12:04 +0800
committerJens Axboe2021-10-26 08:44:38 -0600
commitd308ae0d299a6bb15be4efb91849582d19c23213 (patch)
tree3e71ce1f41bdffe3358d4da83d056426a15585de /block/blk-mq.c
parent9fbfabfda25d8774c5a08634fdd2da000a924890 (diff)
block: drain queue after disk is removed from sysfs
Before removing disk from sysfs, userspace still may change queue via sysfs, such as switching elevator or setting wbt latency, both may reinitialize wbt, then the warning in blk_free_queue_stats() will be triggered since rq_qos_exit() is moved to del_gendisk(). Fixes the issue by moving draining queue & tearing down after disk is removed from sysfs, at that time no one can come into queue's store()/show(). Reported-by: Yi Zhang <yi.zhang@redhat.com> Tested-by: Yi Zhang <yi.zhang@redhat.com> Fixes: 8e141f9eb803 ("block: drain file system I/O on del_gendisk") Signed-off-by: Ming Lei <ming.lei@redhat.com> Link: https://lore.kernel.org/r/20211026101204.2897166-1-ming.lei@redhat.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq.c')
0 files changed, 0 insertions, 0 deletions