diff options
author | Peter Rajnoha <prajnoha@redhat.com> | 2011-06-17 14:50:53 +0000 |
---|---|---|
committer | Peter Rajnoha <prajnoha@redhat.com> | 2011-06-17 14:50:53 +0000 |
commit | 418663b61c88b7a920ce22c66816204b84f732bb (patch) | |
tree | 14e346d205d50705dc3dc8fd8a90eceedaab9752 /tools/lvmcmdline.c | |
parent | bebe60b70c82ed23740726d817219d287a1ebb62 (diff) | |
download | lvm2-418663b61c88b7a920ce22c66816204b84f732bb.tar.gz |
Disable udev fallback by default and add activation/udev_fallback to lvm.conf.
We've used udev fallback code till now to check whether udev
created/removed the entries in /dev correctly and if not,
a repair was done (giving a warning messagea about that).
This patch adds a possibility to enable this additional check
and subsequent fallback only when required (debugging purposes
mostly) and trust udev completely.
So let's disable the fallback code by default and add a new
configuration option "activation/udev_fallback".
(The original code for creating the nodes will still be used
in case the device directory that is set in lvm.conf differs
from the one that udev uses and also when activation/udev_rules
is set to 0 - otherwise we would end up with no nodes/symlinks
at all)
Diffstat (limited to 'tools/lvmcmdline.c')
-rw-r--r-- | tools/lvmcmdline.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c index 3e13a27d6..d6b12cb8c 100644 --- a/tools/lvmcmdline.c +++ b/tools/lvmcmdline.c @@ -952,7 +952,7 @@ static void _apply_settings(struct cmd_context *cmd) cmd->handles_missing_pvs = 0; } -static int _set_udev_checking(struct cmd_context *cmd) +static int _set_udev_fallback(struct cmd_context *cmd) { #ifdef UDEV_SYNC_SUPPORT const char *udev_dev_dir; @@ -984,6 +984,9 @@ static int _set_udev_checking(struct cmd_context *cmd) cmd->dev_dir, udev_dev_dir); dm_udev_set_checking(0); init_udev_checking(0); + + /* Device directories differ - we must use the fallback code! */ + cmd->current_settings.udev_fallback = 1; } #endif @@ -1088,7 +1091,7 @@ int lvm_run_command(struct cmd_context *cmd, int argc, char **argv) log_debug("O_DIRECT will be used"); #endif - if (!_set_udev_checking(cmd)) + if (!_set_udev_fallback(cmd)) goto_out; if ((ret = _process_common_commands(cmd))) { |