[dm-devel] [PATCH] dm writecache: advance the number of arguments when reporting max_age

Mikulas Patocka mpatocka at redhat.com
Tue Nov 10 12:44:01 UTC 2020


When we report the "max_age" value, we must advance the number of
arguments by two.

Signed-off-by: Mikulas Patocka <mpatocka at redhat.com>
Fixes: 3923d4854e18 ("dm writecache: implement gradual cleanup")
Cc: stable at vger.kernel.org	# v5.7+

---
 drivers/md/dm-writecache.c |    2 ++
 1 file changed, 2 insertions(+)

Index: linux-2.6/drivers/md/dm-writecache.c
===================================================================
--- linux-2.6.orig/drivers/md/dm-writecache.c	2020-11-10 11:09:53.000000000 +0100
+++ linux-2.6/drivers/md/dm-writecache.c	2020-11-10 13:29:52.000000000 +0100
@@ -2479,6 +2479,8 @@ static void writecache_status(struct dm_
 			extra_args += 2;
 		if (wc->autocommit_time_set)
 			extra_args += 2;
+		if (wc->max_age != MAX_AGE_UNSPECIFIED)
+			extra_args += 2;
 		if (wc->cleaner)
 			extra_args++;
 		if (wc->writeback_fua_set)




More information about the dm-devel mailing list