Invalidate devices in cache after precommited metadata was wiped.
PATCH 1/1 Invalidate devices in cache after precommited metadata was wiped.
The only place when vginfo->precommited is set is during metadata store in cache.
It means that if we store precommited metadata in cache, then call drop_cached_metadata without subsequent storing commited metadata, cache is not invalidated on drop cache call.
If there is no cached metadata, invalidate device info always.
This is real fix for bug 547842.
--- lib/cache/lvmcache.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
lib/cache/lvmcache.c +1 -1
@@ -173,7 +173,7 @@ static void _drop_metadata(const char *vgname)* and we must not do it again. */ -if (!vginfo->precommitted) +if (!vginfo->precommitted || !vginfo->vgmetadata)dm_list_iterate_items (info, &vginfo->infos) info->status |= CACHE_INVALID;
Signature · 1 line
1.6.5.7
PATCH 1/1 Invalidate devices in cache after precommited metadata was wiped.
Quoted 8 lines · Milan Broz
The only place when
vginfo->precommitedis set is during metadata store in cache.It means that if we store precommited metadata in cache, then call
drop_cached_metadatawithout subsequent storing commited metadata, cache is not invalidated on drop cache call.If there is no cached metadata, invalidate device info always.
NACKing this myself, the precommited metadata problem is much more complex and will require another approach.
Milan