[PATCH] dmthin: express low_water in cluster_size not sector size

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



I noticed that thin-pool sent out "reached low water mark for data
device" event even before thin-pool device was mounted in
generic/347, this is because low water mark was set to a too high
value.

According to kernel thin-provisioning.txt documentation, low water
mark should be expressed in blocks of $cluster_size, not in sectors.

"$low_water_mark is expressed in blocks of size $data_block_size."

Signed-off-by: Eryu Guan <eguan@xxxxxxxxxx>
---
 common/dmthin | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/common/dmthin b/common/dmthin
index 1b5c856..3cd206a 100644
--- a/common/dmthin
+++ b/common/dmthin
@@ -91,6 +91,8 @@ _dmthin_init()
 	if [ -z "$low_water" ]; then
 		low_water=204800	# 100M, in sectors
 	fi
+	# low_water is expressed in blocks of size $cluster_size
+	low_water=$((low_water / cluster_size))
 
 	# Need to make linear metadata and data devs.  From kernel docs:
 	# As a guide, we suggest you calculate the number of bytes to use in the
-- 
2.5.5

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux