summaryrefslogtreecommitdiffstats
path: root/tools/lvchange.c
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2012-03-23 09:58:04 +0000
committerZdenek Kabelac <zkabelac@redhat.com>2012-03-23 09:58:04 +0000
commit2caa558e7c57efa6c0d7cf4e38cee68445a6d7f6 (patch)
tree107900dd0aee55a103c6cb60ba628c8f6d913f35 /tools/lvchange.c
parent5da4d94adc02df77976d1381bfea914fe2622850 (diff)
downloadlvm2-2caa558e7c57efa6c0d7cf4e38cee68445a6d7f6.tar.gz
lvm2-2caa558e7c57efa6c0d7cf4e38cee68445a6d7f6.tar.xz
lvm2-2caa558e7c57efa6c0d7cf4e38cee68445a6d7f6.zip
Update and fix monitoring of thin pool devices
Code adds better support for monitoring of thin pool devices. update_pool_lv uses DMEVENTD_MONITOR_IGNORE to not manipulate with monitoring. vgchange & lvchange are checking real thin pool device for existance as we are using _tpool real device and visible LV pool device might not be even active (_tpool is activated implicitely for any thin volume). monitor_dev_for_events is another _lv_postorder like code it might be worth to think about reusing it here - for now update the code to properly monitory thin volume deps. For unmonitoring add extra code to check the usage of thin pool - in case it's in use unmonitoring of thin volume is skipped.
Diffstat (limited to 'tools/lvchange.c')
-rw-r--r--tools/lvchange.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/lvchange.c b/tools/lvchange.c
index 55799c66..2ed8c16c 100644
--- a/tools/lvchange.c
+++ b/tools/lvchange.c
@@ -94,7 +94,8 @@ static int lvchange_monitoring(struct cmd_context *cmd,
{
struct lvinfo info;
- if (!lv_info(cmd, lv, 0, &info, 0, 0) || !info.exists) {
+ if (!lv_info(cmd, lv, lv_is_thin_pool(lv) ? 1 : 0,
+ &info, 0, 0) || !info.exists) {
log_error("Logical volume, %s, is not active", lv->name);
return 0;
}