Gitweb:
http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=86b04ebd193c9d...
Commit: 86b04ebd193c9db09ee5f03a2de4997aa2ab52c3
Parent: 7e1c08bb6a90acdbf56e362ee017bd48de13a535
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Oct 9 21:35:05 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Oct 13 14:38:52 2015 +0200
thin: enhance logging
Add debug message with more details about threshold overflow.
---
lib/metadata/thin_manip.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/lib/metadata/thin_manip.c b/lib/metadata/thin_manip.c
index 24c68a8..37bf4cb 100644
--- a/lib/metadata/thin_manip.c
+++ b/lib/metadata/thin_manip.c
@@ -224,15 +224,27 @@ int pool_below_threshold(const struct lv_segment *pool_seg)
if (!lv_thin_pool_percent(pool_seg->lv, 0, &percent))
return_0;
- if (percent >= threshold)
+ if (percent >= threshold) {
+ log_debug("Threshold configured for free data space in "
+ "thin pool %s has been reached (%.2f%% >= %.2f%%).",
+ display_lvname(pool_seg->lv),
+ dm_percent_to_float(percent),
+ dm_percent_to_float(threshold));
return 0;
+ }
/* Metadata */
if (!lv_thin_pool_percent(pool_seg->lv, 1, &percent))
return_0;
- if (percent >= threshold)
+ if (percent >= threshold) {
+ log_debug("Threshold configured for free metadata space in "
+ "thin pool %s has been reached (%.2f%% > %.2f%%).",
+ display_lvname(pool_seg->lv),
+ dm_percent_to_float(percent),
+ dm_percent_to_float(threshold));
return 0;
+ }
return 1;
}