From 042d98b2d2676bcb8e94fae8c43fe4cc8308fe4d Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Thu, 8 Dec 2011 23:18:00 +0000 Subject: [PATCH] When dropping the VG metadata from the cache during a VG revert, we must reset the 'precomitted' flag, just as we'd clear if we next did a 'commit'. --- lib/cache/lvmcache.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c index c02ec7b96..5bf683fb3 100644 --- a/lib/cache/lvmcache.c +++ b/lib/cache/lvmcache.c @@ -205,6 +205,10 @@ static void _drop_metadata(const char *vgname, int drop_precommitted) info->status |= CACHE_INVALID; _free_cached_vgmetadata(vginfo); + + /* VG revert */ + if (drop_precommitted) + vginfo->precommitted = 0; } /* -- 2.43.5