diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2021-05-26 15:49:03 -0400 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2021-06-04 12:07:27 -0400 |
commit | af4f6cabcc5a2449e6b7663d45227bfcb6b725ec (patch) | |
tree | 5034858acd1b090e89c10ca3879d10b397e41290 /drivers/md | |
parent | ee50cc19d80e9b9a8283d1fb517a778faf2f6899 (diff) |
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.c | 5 |
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; } |