• Jianchao Wang's avatar
    blk-mq: init hctx sched after update ctx and hctx mapping · d48ece20
    Jianchao Wang authored
    Currently, when update nr_hw_queues, IO scheduler's init_hctx will
    be invoked before the mapping between ctx and hctx is adapted
    correctly by blk_mq_map_swqueue. The IO scheduler init_hctx (kyber)
    may depend on this mapping and get wrong result and panic finally.
    A simply way to fix this is that switch the IO scheduler to 'none'
    before update the nr_hw_queues, and then switch it back after
    update nr_hw_queues. blk_mq_sched_init_/exit_hctx are removed due
    to nobody use them any more.
    Signed-off-by: default avatarJianchao Wang <jianchao.w.wang@oracle.com>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    d48ece20
elevator.c 27.4 KB