1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Fix internal metadata corruption in lvchange --resync.

This commit is contained in:
Alasdair Kergon 2008-01-26 00:13:45 +00:00
parent ec2bd20886
commit 311961fdb8
2 changed files with 5 additions and 0 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.32 -
===================================
Fix internal metadata corruption in lvchange --resync. (2.02.30)
Fix new parameter validation in vgsplit and test mode. (2.02.30)
Remove redundant cnxman-socket.h file from clvmd directory.
Fix pvs, vgs, lvs error exit status on some error paths.

View File

@ -274,6 +274,7 @@ static int lvchange_resync(struct cmd_context *cmd,
first_seg(lv)->log_lv = NULL;
log_lv->status &= ~MIRROR_LOG;
log_lv->status |= VISIBLE_LV;
remove_seg_from_segs_using_this_lv(log_lv, first_seg(lv));
if (!vg_write(lv->vg)) {
log_error("Failed to write intermediate VG metadata.");
@ -281,6 +282,7 @@ static int lvchange_resync(struct cmd_context *cmd,
first_seg(lv)->log_lv = log_lv;
log_lv->status |= MIRROR_LOG;
log_lv->status &= ~VISIBLE_LV;
add_seg_to_segs_using_this_lv(log_lv, first_seg(lv));
if (!activate_lv(cmd, lv))
stack;
}
@ -295,6 +297,7 @@ static int lvchange_resync(struct cmd_context *cmd,
first_seg(lv)->log_lv = log_lv;
log_lv->status |= MIRROR_LOG;
log_lv->status &= ~VISIBLE_LV;
add_seg_to_segs_using_this_lv(log_lv, first_seg(lv));
if (!activate_lv(cmd, lv))
stack;
}
@ -326,6 +329,7 @@ static int lvchange_resync(struct cmd_context *cmd,
first_seg(lv)->log_lv = log_lv;
log_lv->status |= MIRROR_LOG;
log_lv->status &= ~VISIBLE_LV;
add_seg_to_segs_using_this_lv(log_lv, first_seg(lv));
}
log_very_verbose("Updating logical volume \"%s\" on disk(s)", lv->name);