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

Remove INCONSISTENT_VG flag

As this flag could not have been set by the current code - removing it.

Note: because of the wrong code logic this call:

lvmcache_update_vg(correct_vg, correct_vg->status & PRECOMMITTED &
			   (inconsistent ? INCONSISTENT_VG : 0));

had always passed '0' - now after flag removal it's passing
PRECOMMITTED flag in - this present functinal change in this patch.

To match the original functionality - 0 had to be always passed.
More testing is needed here.
This commit is contained in:
Zdenek Kabelac 2011-08-10 20:17:33 +00:00
parent e01bcc6884
commit 789f9c55e5
3 changed files with 4 additions and 9 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.87 -
===============================
Remove INCONSISTENT_VG flag from the code.
Remove lock from cache even if unlock fails.
Initialise clvmd locks before lvm context to avoid open descriptor leaks.
Remove obsoleted GULM clvmd cluster locking support.

View File

@ -2861,12 +2861,8 @@ static struct volume_group *_vg_read(struct cmd_context *cmd,
* the missing PV logic below.
*/
if ((correct_vg = lvmcache_get_vg(vgid, precommitted)) &&
(use_precommitted || !*consistent || !(correct_vg->status & INCONSISTENT_VG))) {
if (!(correct_vg->status & INCONSISTENT_VG))
*consistent = 1;
else /* Inconsistent but we can't repair it */
correct_vg->status &= ~INCONSISTENT_VG;
(use_precommitted || !*consistent)) {
*consistent = 1;
return correct_vg;
} else {
free_vg(correct_vg);
@ -3131,8 +3127,7 @@ static struct volume_group *_vg_read(struct cmd_context *cmd,
* If there is no precommitted metadata, committed metadata
* is read and stored in the cache even if use_precommitted is set
*/
lvmcache_update_vg(correct_vg, correct_vg->status & PRECOMMITTED &
(inconsistent ? INCONSISTENT_VG : 0));
lvmcache_update_vg(correct_vg, (correct_vg->status & PRECOMMITTED));
if (inconsistent) {
/* FIXME Test should be if we're *using* precommitted metadata not if we were searching for it */

View File

@ -75,7 +75,6 @@
//#define CONVERTING 0x00400000U /* LV */
//#define MISSING_PV 0x00800000U /* PV */
#define INCONSISTENT_VG 0x00800000U /* VG - internal use only */
//#define PARTIAL_LV 0x01000000U /* LV - derived flag, not
// written out in metadata*/