1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-08-02 04:22:02 +03:00

Fix process_each_vg / _process_one_vg when vg_read() returns FAILED_LOCKING.

Remove the checks for vg_read_error() in most of the tools callback
functions and instead make the check in _process_one_vg() more general.

In all but vgcfgbackup, we do not want to proceed if we get any error
from vg_read().  In vgcfgbackup's case, we may proceed if the backup
is to proceed with inconsistent VGs.  This is a special case though,
and we mark it with the READ_ALLOW_INCONSISTENT flag passed to
process_each_vg (and subsequently to _process_one_vg).

NOTE: More cleanup is needed in the vg_read_error() path cases.
This patch is a start.
This commit is contained in:
Dave Wysochanski
2009-09-15 01:38:59 +00:00
parent 90c8088760
commit 266214db84
13 changed files with 12 additions and 51 deletions

View File

@ -92,7 +92,7 @@ int vgcfgbackup(struct cmd_context *cmd, int argc, char **argv)
init_pvmove(1);
ret = process_each_vg(cmd, argc, argv, 0,
ret = process_each_vg(cmd, argc, argv, READ_ALLOW_INCONSISTENT,
&last_filename, &vg_backup_single);
dm_free(last_filename);