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

Drop metadata cache if update fails in vg_revert or vg_commit.

This commit is contained in:
Alasdair Kergon 2008-06-03 17:56:54 +00:00
parent dcd5353502
commit ad134662a2
2 changed files with 7 additions and 1 deletions

View File

@ -9,6 +9,7 @@ Version 2.02.38 -
Version 2.02.37 -
=================================
Drop metadata cache if update fails in vg_revert or vg_commit.
Avoid spurious duplicate VG messages referring to VGs that are gone.
Drop dev_name_confirmed error message to debug level.
Fix setpriority error message to signed int.

View File

@ -1363,7 +1363,8 @@ int vg_commit(struct volume_group *vg)
}
}
if (!drop_cached_metadata(vg))
/* If update failed, remove any cached precommitted metadata. */
if (!cache_updated && !drop_cached_metadata(vg))
log_error("Attempt to drop cached metadata failed "
"after commit for VG %s.", vg->name);
@ -1383,6 +1384,10 @@ int vg_revert(struct volume_group *vg)
}
}
if (!drop_cached_metadata(vg))
log_error("Attempt to drop cached metadata failed "
"after reverted update for VG %s.", vg->name);
return 1;
}