提交 af4f6cab 编写于 作者: M Mikulas Patocka 提交者: Mike Snitzer

dm writecache: interrupt writeback if suspended

If the DM device is suspended, interrupt the writeback sequence so
that there is no excessive suspend delay.
Signed-off-by: NMikulas Patocka <mpatocka@redhat.com>
Signed-off-by: NMike Snitzer <snitzer@redhat.com>
上级 ee50cc19
...@@ -1844,8 +1844,9 @@ static void writecache_writeback(struct work_struct *work) ...@@ -1844,8 +1844,9 @@ static void writecache_writeback(struct work_struct *work)
n_walked++; n_walked++;
if (unlikely(n_walked > WRITEBACK_LATENCY) && if (unlikely(n_walked > WRITEBACK_LATENCY) &&
likely(!wc->writeback_all) && likely(!dm_suspended(wc->ti))) { likely(!wc->writeback_all)) {
queue_work(wc->writeback_wq, &wc->writeback_work); if (likely(!dm_suspended(wc->ti)))
queue_work(wc->writeback_wq, &wc->writeback_work);
break; break;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册