From: Eryu Guan <eguan@redhat.com>
To: fstests@vger.kernel.org
Cc: Eryu Guan <eguan@redhat.com>
Subject: [PATCH] dmthin: express low_water in cluster_size not sector size
Date: Mon, 20 Jun 2016 12:53:06 +0800 [thread overview]
Message-ID: <1466398386-5248-1-git-send-email-eguan@redhat.com> (raw)
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@redhat.com>
---
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
next reply other threads:[~2016-06-20 4:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-20 4:53 Eryu Guan [this message]
2016-06-22 0:03 ` [PATCH] dmthin: express low_water in cluster_size not sector size Dave Chinner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1466398386-5248-1-git-send-email-eguan@redhat.com \
--to=eguan@redhat.com \
--cc=fstests@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox