]> sourceware.org Git - lvm2.git/commitdiff
When dropping the VG metadata from the cache during a VG revert, we must
authorAlasdair Kergon <agk@redhat.com>
Thu, 8 Dec 2011 23:18:00 +0000 (23:18 +0000)
committerAlasdair Kergon <agk@redhat.com>
Thu, 8 Dec 2011 23:18:00 +0000 (23:18 +0000)
reset the 'precomitted' flag, just as we'd clear if we next did a 'commit'.

lib/cache/lvmcache.c

index c02ec7b96127a93225c6b4e7b7190c3b8121a50b..5bf683fb307dfc1559ea34d986dac2e89953dcf2 100644 (file)
@@ -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;
 }
 
 /*
This page took 0.038941 seconds and 5 git commands to generate.