From d9c0105fef3f2dc6e8f9698bc1d7d5a4c87f9726 Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Thu, 8 May 2008 18:06:58 +0000 Subject: [PATCH] Drop metadata cache before writing precommitted metadata instead of after. --- WHATS_NEW | 8 ++++++-- lib/metadata/metadata.c | 10 +++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index 7355e9744..fd7e6d8ca 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,9 +1,13 @@ -Version 2.02.37 - +Version 2.02.38 - ================================= - Don't touch /dev in vgrename if activation is disabled. Check lv_count in vg_validate. Add --prefixes to reporting tools for field name prefix output format. +Version 2.02.37 - +================================= + Drop metadata cache before writing precommitted metadata instead of after. + Don't touch /dev in vgrename if activation is disabled. + Version 2.02.36 - 29th April 2008 ================================= Fix fsadm.sh to work with older blockdev, blkid & readlink binaries. diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c index 8182734a7..6a8c1e3c4 100644 --- a/lib/metadata/metadata.c +++ b/lib/metadata/metadata.c @@ -1278,6 +1278,11 @@ int vg_write(struct volume_group *vg) return 0; } + if (!drop_cached_metadata(vg)) { + log_error("Unable to drop cached metadata for VG %s.", vg->name); + return 0; + } + vg->seqno++; /* Write to each copy of the metadata area */ @@ -1343,11 +1348,6 @@ int vg_commit(struct volume_group *vg) return cache_updated; } - if (!drop_cached_metadata(vg)) { - log_error("Unable to drop cached metadata for VG %s.", vg->name); - return 0; - } - /* Commit to each copy of the metadata area */ list_iterate_items(mda, &vg->fid->metadata_areas) { failed = 0;