mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
Fix error paths for vgcfgrestore when locking fails.
This commit is contained in:
parent
454bd4dc3b
commit
cdc8e54e3d
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.52 -
|
Version 2.02.52 -
|
||||||
=================================
|
=================================
|
||||||
|
Fix vgcfgrestore error paths when locking fails (2.02.49).
|
||||||
Added configure --enable-clogd to conditionally build the cluster log daemon.
|
Added configure --enable-clogd to conditionally build the cluster log daemon.
|
||||||
Make lvchange --refresh only take a read lock on volume group.
|
Make lvchange --refresh only take a read lock on volume group.
|
||||||
Fix bug where non-blocking file locks could be granted in error.
|
Fix bug where non-blocking file locks could be granted in error.
|
||||||
|
@ -45,12 +45,12 @@ int vgcfgrestore(struct cmd_context *cmd, int argc, char **argv)
|
|||||||
|
|
||||||
if (!lock_vol(cmd, vg_name, LCK_VG_WRITE)) {
|
if (!lock_vol(cmd, vg_name, LCK_VG_WRITE)) {
|
||||||
log_error("Unable to lock volume group %s", vg_name);
|
log_error("Unable to lock volume group %s", vg_name);
|
||||||
unlock_vg(cmd, VG_ORPHANS);
|
|
||||||
return ECMD_FAILED;
|
return ECMD_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!lock_vol(cmd, VG_ORPHANS, LCK_VG_WRITE)) {
|
if (!lock_vol(cmd, VG_ORPHANS, LCK_VG_WRITE)) {
|
||||||
log_error("Unable to lock orphans");
|
log_error("Unable to lock orphans");
|
||||||
|
unlock_vg(cmd, vg_name);
|
||||||
return ECMD_FAILED;
|
return ECMD_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,8 +58,8 @@ int vgcfgrestore(struct cmd_context *cmd, int argc, char **argv)
|
|||||||
backup_restore_from_file(cmd, vg_name,
|
backup_restore_from_file(cmd, vg_name,
|
||||||
arg_str_value(cmd, file_ARG, "")) :
|
arg_str_value(cmd, file_ARG, "")) :
|
||||||
backup_restore(cmd, vg_name))) {
|
backup_restore(cmd, vg_name))) {
|
||||||
unlock_vg(cmd, vg_name);
|
|
||||||
unlock_vg(cmd, VG_ORPHANS);
|
unlock_vg(cmd, VG_ORPHANS);
|
||||||
|
unlock_vg(cmd, vg_name);
|
||||||
log_error("Restore failed.");
|
log_error("Restore failed.");
|
||||||
return ECMD_FAILED;
|
return ECMD_FAILED;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user