All of lore.kernel.org
 help / color / mirror / Atom feed
* [dm-devel] [PATCH] dm-writecace: if we are suspended, interrupt flushing
@ 2021-05-26 19:49 Mikulas Patocka
  0 siblings, 0 replies; only message in thread
From: Mikulas Patocka @ 2021-05-26 19:49 UTC (permalink / raw)
  To: Mike Snitzer; +Cc: dm-devel

Hi

This is another writecache patch, intended for the next merge window.

Mikulas



From: Mikulas Patocka <mpatocka@redhat.com>

If we are suspended, we want to interrupt the flushing sequence, so that
there is no excessive suspend delay.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org

Index: linux-2.6/drivers/md/dm-writecache.c
===================================================================
--- linux-2.6.orig/drivers/md/dm-writecache.c
+++ linux-2.6/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;
 		}
 

--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-26 19:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-26 19:49 [dm-devel] [PATCH] dm-writecace: if we are suspended, interrupt flushing Mikulas Patocka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.