|
@@ -65,23 +65,26 @@ static struct workqueue_struct *kblockd_workqueue;
|
|
|
|
|
|
static void blk_clear_congested(struct request_list *rl, int sync)
|
|
|
{
|
|
|
- if (rl != &rl->q->root_rl)
|
|
|
- return;
|
|
|
#ifdef CONFIG_CGROUP_WRITEBACK
|
|
|
clear_wb_congested(rl->blkg->wb_congested, sync);
|
|
|
#else
|
|
|
- clear_wb_congested(rl->q->backing_dev_info.wb.congested, sync);
|
|
|
+ /*
|
|
|
+ * If !CGROUP_WRITEBACK, all blkg's map to bdi->wb and we shouldn't
|
|
|
+ * flip its congestion state for events on other blkcgs.
|
|
|
+ */
|
|
|
+ if (rl == &rl->q->root_rl)
|
|
|
+ clear_wb_congested(rl->q->backing_dev_info.wb.congested, sync);
|
|
|
#endif
|
|
|
}
|
|
|
|
|
|
static void blk_set_congested(struct request_list *rl, int sync)
|
|
|
{
|
|
|
- if (rl != &rl->q->root_rl)
|
|
|
- return;
|
|
|
#ifdef CONFIG_CGROUP_WRITEBACK
|
|
|
set_wb_congested(rl->blkg->wb_congested, sync);
|
|
|
#else
|
|
|
- set_wb_congested(rl->q->backing_dev_info.wb.congested, sync);
|
|
|
+ /* see blk_clear_congested() */
|
|
|
+ if (rl == &rl->q->root_rl)
|
|
|
+ set_wb_congested(rl->q->backing_dev_info.wb.congested, sync);
|
|
|
#endif
|
|
|
}
|
|
|
|