]> rtime.felk.cvut.cz Git - zynq/linux.git/commit
blk-mq: fix CPU hotplug handling
authorMing Lei <ming.lei@canonical.com>
Tue, 21 Apr 2015 02:00:20 +0000 (10:00 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 May 2015 16:55:07 +0000 (09:55 -0700)
commit69f3181a88e391dbde3ad0b0a1d8722e200e84ac
tree4fcff1b3ebd8d65c6d476f12a423e75d1db65802
parentf7bbf3add4e037d8fb5f6251b33dda6a029cbdac
blk-mq: fix CPU hotplug handling

commit 2a34c0872adf252f23a6fef2d051a169ac796cef upstream.

hctx->tags has to be set as NULL in case that it is to be unmapped
no matter if set->tags[hctx->queue_num] is NULL or not in blk_mq_map_swqueue()
because shared tags can be freed already from another request queue.

The same situation has to be considered during handling CPU online too.
Unmapped hw queue can be remapped after CPU topo is changed, so we need
to allocate tags for the hw queue in blk_mq_map_swqueue(). Then tags
allocation for hw queue can be removed in hctx cpu online notifier, and it
is reasonable to do that after mapping is updated.

Reported-by: Dongsu Park <dongsu.park@profitbricks.com>
Tested-by: Dongsu Park <dongsu.park@profitbricks.com>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
block/blk-mq.c