summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2021-05-26 21:49:03 +0200
committerMike Snitzer <snitzer@redhat.com>2021-06-04 18:07:27 +0200
commitaf4f6cabcc5a2449e6b7663d45227bfcb6b725ec (patch)
tree5034858acd1b090e89c10ca3879d10b397e41290 /drivers/md
parentdm writecache: don't split bios when overwriting contiguous cache content (diff)
downloadlinux-af4f6cabcc5a2449e6b7663d45227bfcb6b725ec.tar.xz
linux-af4f6cabcc5a2449e6b7663d45227bfcb6b725ec.zip
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: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-writecache.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/md/dm-writecache.c b/drivers/md/dm-writecache.c
index a44007297e63..ea9f0d8fff1d 100644
--- a/drivers/md/dm-writecache.c
+++ b/drivers/md/dm-writecache.c
@@ -1844,8 +1844,9 @@ restart:
n_walked++;
if (unlikely(n_walked > WRITEBACK_LATENCY) &&
- likely(!wc->writeback_all) && likely(!dm_suspended(wc->ti))) {
- queue_work(wc->writeback_wq, &wc->writeback_work);
+ likely(!wc->writeback_all)) {
+ if (likely(!dm_suspended(wc->ti)))
+ queue_work(wc->writeback_wq, &wc->writeback_work);
break;
}