[PATCH] dm: writecache: fix autocommit_time option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The option is in terms of msecs so we should be using msecs_to_jiffies()
to convert it instead of the other way around.

Fixes: 1be8d9c3da01 ("dm: add writecache target")
Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

diff --git a/drivers/md/dm-writecache.c b/drivers/md/dm-writecache.c
index f2ae02f22c43..c755e8bc6bdd 100644
--- a/drivers/md/dm-writecache.c
+++ b/drivers/md/dm-writecache.c
@@ -1995,7 +1995,7 @@ static int writecache_ctr(struct dm_target *ti, unsigned argc, char **argv)
 				goto invalid_optional;
 			if (autocommit_msecs > 3600000)
 				goto invalid_optional;
-			wc->autocommit_jiffies = jiffies_to_msecs(autocommit_msecs);
+			wc->autocommit_jiffies = msecs_to_jiffies(autocommit_msecs);
 			wc->autocommit_time_set = true;
 		} else if (!strcasecmp(string, "fua")) {
 			if (WC_MODE_PMEM(wc)) {

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



[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux