Skip to contentSkip to conversation

dev-mornfall-lvmcache - toolcontext: check dm version lazily for udev_fallback setting

PATCH Petr Rockai 1 participant 1 message Jun 5, 2013

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=44071331138a7ca3a7d775d8a091933404ee7509
Commit:        44071331138a7ca3a7d775d8a091933404ee7509
Parent:        3d0cb0611e5e68fc4d865102f8339552a907ff4b
Author:        Peter Rajnoha <[email protected]>
AuthorDate:    Mon May 13 11:46:24 2013 +0200
Committer:     Peter Rajnoha <[email protected]>
CommitterDate: Mon May 13 11:53:53 2013 +0200

toolcontext: check dm version lazily for udev_fallback setting

Setting the cmd->default_settings.udev_fallback also requires DM driver version check. However, this caused useless mapper/control access with ioctl if not needed actually. For example if we're not using activation code, we don't need to know the udev_fallback as there's no node and symlink processing.

For example, this premature mapper/control access caused problems when using lvm2app even when no activation happens - there are situations in which we don't need to use mapper/control, but still need some of the lvm2app functionality. This is also the case for lvm2-activation systemd generator which just needs to look at the lvm2 configuration, but it shouldn't touch mapper/control.

---
 WHATS_NEW                  |    1 +
 lib/activate/dev_manager.c |   57 +++++++++++++++++++++++++++++++++++++++++--
 lib/commands/toolcontext.c |   46 ++++++-----------------------------
 3 files changed, 63 insertions(+), 41 deletions(-)
WHATS_NEW +1 -0
index bad183c..2cdd0cd 100644
@@ -1,5 +1,6 @@
 Version 2.02.99 - 
 ===================================
+  Fix premature DM version checking which caused useless mapper/control access.
   Add "active" LV reporting field to show activation state.
   Add "monitor" segment reporting field to show dmevent monitoring status.
   Document lvextend --use-policies option in man.
lib/activate/dev_manager.c +54 -3

81 lines not on this page · raw message

lib/commands/toolcontext.c +7 -37

60 lines not on this page · raw message