mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
Always return exit error status when locking of volume group fails.
This commit is contained in:
parent
6ce8f8d553
commit
1b25b6e009
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.46 -
|
Version 2.02.46 -
|
||||||
================================
|
================================
|
||||||
|
Always return exit error status when locking of volume group fails.
|
||||||
Fix mirror log convert validation question.
|
Fix mirror log convert validation question.
|
||||||
Avoid referencing files from DESTDIR during build process.
|
Avoid referencing files from DESTDIR during build process.
|
||||||
Avoid creating some static libraries without static_link.
|
Avoid creating some static libraries without static_link.
|
||||||
|
@ -285,6 +285,7 @@ int process_each_lv(struct cmd_context *cmd, int argc, char **argv,
|
|||||||
continue; /* FIXME Unnecessary? */
|
continue; /* FIXME Unnecessary? */
|
||||||
if (!lock_vol(cmd, vgname, lock_type)) {
|
if (!lock_vol(cmd, vgname, lock_type)) {
|
||||||
log_error("Can't lock %s: skipping", vgname);
|
log_error("Can't lock %s: skipping", vgname);
|
||||||
|
ret_max = ECMD_FAILED;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (lock_type & LCK_WRITE)
|
if (lock_type & LCK_WRITE)
|
||||||
@ -442,7 +443,7 @@ static int _process_one_vg(struct cmd_context *cmd, const char *vg_name,
|
|||||||
|
|
||||||
if (!lock_vol(cmd, vg_name, lock_type)) {
|
if (!lock_vol(cmd, vg_name, lock_type)) {
|
||||||
log_error("Can't lock volume group %s: skipping", vg_name);
|
log_error("Can't lock volume group %s: skipping", vg_name);
|
||||||
return ret_max;
|
return ECMD_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
log_verbose("Finding volume group \"%s\"", vg_name);
|
log_verbose("Finding volume group \"%s\"", vg_name);
|
||||||
@ -745,6 +746,7 @@ int process_each_pv(struct cmd_context *cmd, int argc, char **argv,
|
|||||||
dm_list_iterate_items(sll, vgnames) {
|
dm_list_iterate_items(sll, vgnames) {
|
||||||
if (!lock_vol(cmd, sll->str, lock_type)) {
|
if (!lock_vol(cmd, sll->str, lock_type)) {
|
||||||
log_error("Can't lock %s: skipping", sll->str);
|
log_error("Can't lock %s: skipping", sll->str);
|
||||||
|
ret_max = ECMD_FAILED;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!(vg = vg_read_internal(cmd, sll->str, NULL, &consistent))) {
|
if (!(vg = vg_read_internal(cmd, sll->str, NULL, &consistent))) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user