1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

thin: enhance logging

Add debug message with more details about threshold overflow.
This commit is contained in:
Zdenek Kabelac 2015-10-09 21:35:05 +02:00
parent 7e1c08bb6a
commit 86b04ebd19

View File

@ -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;
}