mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Avoid repeatedly wiping cache while VG_GLOBAL is held in vgscan & pvscan.
This commit is contained in:
parent
91e9ae2629
commit
a0e00ccf3f
@ -1,5 +1,6 @@
|
||||
Version 2.02.40 -
|
||||
================================
|
||||
Avoid repeatedly wiping cache while VG_GLOBAL is held in vgscan & pvscan.
|
||||
Fix pvresize to not allow resize if PV has two metadata areas.
|
||||
Fix setting of volume limit count if converting to lvm1 format.
|
||||
Fix vgconvert logical volume id metadata validation.
|
||||
|
7
lib/cache/lvmcache.c
vendored
7
lib/cache/lvmcache.c
vendored
@ -97,9 +97,10 @@ static void _update_cache_info_lock_state(struct lvmcache_info *info,
|
||||
int was_locked = (info->status & CACHE_LOCKED) ? 1 : 0;
|
||||
|
||||
/*
|
||||
* Cache becomes invalid whenever lock state changes
|
||||
* Cache becomes invalid whenever lock state changes unless
|
||||
* exclusive VG_GLOBAL is held (i.e. while scanning).
|
||||
*/
|
||||
if (was_locked != locked) {
|
||||
if (!vgname_is_locked(VG_GLOBAL) && (was_locked != locked)) {
|
||||
info->status |= CACHE_INVALID;
|
||||
*cached_vgmetadata_valid = 0;
|
||||
}
|
||||
@ -166,7 +167,7 @@ void lvmcache_drop_metadata(const char *vgname)
|
||||
|
||||
/* Indicate that PVs could now be missing from the cache */
|
||||
init_full_scan_done(0);
|
||||
} else
|
||||
} else if (!vgname_is_locked(VG_GLOBAL))
|
||||
_drop_metadata(vgname);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user