1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

suspend using existing LV metadata; vgreduce then needs partial flag

This commit is contained in:
Alasdair Kergon 2006-02-03 19:36:20 +00:00
parent 93dc5190bc
commit e408d62eaf
2 changed files with 6 additions and 3 deletions

View File

@ -616,11 +616,11 @@ static int _lv_suspend(struct cmd_context *cmd, const char *lvid_s,
return 1;
if (!(lv = lv_from_lvid(cmd, lvid_s, 0)))
return 0;
return_0;
/* Use precommitted metadata if present */
if (!(lv_pre = lv_from_lvid(cmd, lvid_s, 1)))
return 0;
return_0;
if (test_mode()) {
_skip("Suspending '%s'.", lv->name);
@ -645,7 +645,7 @@ static int _lv_suspend(struct cmd_context *cmd, const char *lvid_s,
stack;
memlock_inc();
if (!_lv_suspend_lv(lv_pre)) {
if (!_lv_suspend_lv(lv)) {
memlock_dec();
fs_unlock();
return 0;

View File

@ -230,11 +230,14 @@ static int _make_vg_consistent(struct cmd_context *cmd, struct volume_group *vg)
if (!test_mode()) {
/* Suspend lvs_changed */
init_partial(1);
if (!suspend_lvs(cmd, &lvs_changed)) {
stack;
init_partial(0);
vg_revert(vg);
return 0;
}
init_partial(0);
}
if (!vg_commit(vg)) {