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

Signed-off-by: Mikulas Patocka <[email protected]>
Fixes: 3923d4854e18 ("dm writecache: implement gradual cleanup")
Cc: [email protected]      # 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)

--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel

Reply via email to