From dan.carpenter@oracle.com Thu Jun 7 04:30:02 2018 Date: Thu, 7 Jun 2018 11:28:38 +0300 From: Dan Carpenter To: Alasdair Kergon , Mikulas Patocka Cc: Mike Snitzer , dm-devel@redhat.com, kernel-janitors@vger.kernel.org Subject: [PATCH] dm: writecache: fix autocommit_time option 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 --- drivers/md/dm-writecache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-2.6/drivers/md/dm-writecache.c =================================================================== --- linux-2.6.orig/drivers/md/dm-writecache.c 2018-06-07 21:21:44.000000000 +0200 +++ linux-2.6/drivers/md/dm-writecache.c 2018-06-07 21:21:44.000000000 +0200 @@ -2013,7 +2013,7 @@ static int writecache_ctr(struct dm_targ 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)) {