* [PATCH] Invalidate devices in cache after precommited metadata was wiped.
@ 2009-12-20 15:32 Milan Broz
2009-12-21 18:13 ` Milan Broz
0 siblings, 1 reply; 2+ messages in thread
From: Milan Broz @ 2009-12-20 15:32 UTC (permalink / raw)
To: lvm-devel
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.
Signed-off-by: Milan Broz <mbroz@redhat.com>
---
lib/cache/lvmcache.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c
index 358cd80..fa6daee 100644
--- a/lib/cache/lvmcache.c
+++ b/lib/cache/lvmcache.c
@@ -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;
--
1.6.5.7
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] Invalidate devices in cache after precommited metadata was wiped.
2009-12-20 15:32 [PATCH] Invalidate devices in cache after precommited metadata was wiped Milan Broz
@ 2009-12-21 18:13 ` Milan Broz
0 siblings, 0 replies; 2+ messages in thread
From: Milan Broz @ 2009-12-21 18:13 UTC (permalink / raw)
To: lvm-devel
On 12/20/2009 04:32 PM, Milan Broz wrote:
> 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.
NACKing this myself, the precommited metadata problem is much more
complex and will require another approach.
Milan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-12-21 18:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-20 15:32 [PATCH] Invalidate devices in cache after precommited metadata was wiped Milan Broz
2009-12-21 18:13 ` Milan Broz
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.