提交 2a7d5559 编写于 作者: S Shaohua Li 提交者: Jens Axboe

block: stack unplug

MD raid1 prepares to dispatch request in unplug callback. If make_request in
low level queue also uses unplug callback to dispatch request, the low level
queue's unplug callback will not be called. Recheck the callback list helps
this case.
Signed-off-by: NShaohua Li <shli@fusionio.com>
Signed-off-by: NNeilBrown <neilb@suse.de>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 9cbb1750
...@@ -2913,9 +2913,7 @@ static void flush_plug_callbacks(struct blk_plug *plug) ...@@ -2913,9 +2913,7 @@ static void flush_plug_callbacks(struct blk_plug *plug)
{ {
LIST_HEAD(callbacks); LIST_HEAD(callbacks);
if (list_empty(&plug->cb_list)) while (!list_empty(&plug->cb_list)) {
return;
list_splice_init(&plug->cb_list, &callbacks); list_splice_init(&plug->cb_list, &callbacks);
while (!list_empty(&callbacks)) { while (!list_empty(&callbacks)) {
...@@ -2925,6 +2923,7 @@ static void flush_plug_callbacks(struct blk_plug *plug) ...@@ -2925,6 +2923,7 @@ static void flush_plug_callbacks(struct blk_plug *plug)
list_del(&cb->list); list_del(&cb->list);
cb->callback(cb); cb->callback(cb);
} }
}
} }
struct blk_plug_cb *blk_check_plugged(blk_plug_cb_fn unplug, void *data, struct blk_plug_cb *blk_check_plugged(blk_plug_cb_fn unplug, void *data,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册