summaryrefslogtreecommitdiff
path: root/lib/display
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2014-04-28 11:50:38 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2014-04-28 12:40:17 +0200
commit71314a9905eb5f515aa15af5de2a1f73d82b5ae3 (patch)
tree3f0d2be3f09cb6174ff7705107a16d33617887fc /lib/display
parent91a8e4a3d8198990ddffcfa9916ba22dcb0c033d (diff)
downloadlvm2-71314a9905eb5f515aa15af5de2a1f73d82b5ae3.tar.gz
thin: display info when -tpool is running
For percentage display we need -tpool - so check for layered device presence here instead of plain pool device. Also update 'info' - so when pool is 'available' we display open count for -tpool device instead of mostly irrelevant pool. TODO: Maybe we should actually display this open info always? (even when just -tpool is available, but pool is not)
Diffstat (limited to 'lib/display')
-rw-r--r--lib/display/display.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/display/display.c b/lib/display/display.c
index d824150c5..83fb90168 100644
--- a/lib/display/display.c
+++ b/lib/display/display.c
@@ -525,7 +525,7 @@ int lvdisplay_full(struct cmd_context *cmd,
log_print("LV merged with %s",
find_snapshot(lv)->lv->name);
} else if (lv_is_thin_pool(lv)) {
- if (inkernel) {
+ if (lv_info(cmd, lv, 1, &info, 1, 1) && info.exists) {
thin_data_active = lv_thin_pool_percent(lv, 0, &thin_data_percent);
thin_metadata_active = lv_thin_pool_percent(lv, 1, &thin_metadata_percent);
}