From: Zdenek Kabelac <zkabelac@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH 2/5] Remove vg_validate call when parsing cached metadata.
Date: Wed, 31 Mar 2010 14:25:40 +0200 [thread overview]
Message-ID: <4BB33F44.6040702@redhat.com> (raw)
In-Reply-To: <59763531708170fbd57e63cc407e7a7f7557c1b2.1269866168.git.mbroz@redhat.com>
On 29.3.2010 15:12, Milan Broz wrote:
> vg_validate call is an adept to optimisation, it is very
> ineeficient and slow.
>
> Anyway, we should call it only before writing data to disk.
>
> The call in lvmcache was just temporary validation,
> we realy do not need to revalidate cached metadata
> every time.
> (Actually, I added that there just to prove that cache works
> properly and forgot to remove it.)
>
> Patch removes it from lvmcache completely, this can hit only
> internal bug in export function (and this bug must
> be detected in any vg_write call anyway before).
>
> Signed-off-by: Milan Broz <mbroz@redhat.com>
> ---
> lib/cache/lvmcache.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c
> index 0ce034a..9caa216 100644
> --- a/lib/cache/lvmcache.c
> +++ b/lib/cache/lvmcache.c
> @@ -610,8 +610,7 @@ struct volume_group *lvmcache_get_vg(const char *vgid, unsigned precommitted)
> vgid, NULL)))
> return_NULL;
>
> - if (!(vg = import_vg_from_buffer(vginfo->vgmetadata, fid)) ||
> - !vg_validate(vg)) {
> + if (!(vg = import_vg_from_buffer(vginfo->vgmetadata, fid))) {
> _free_cached_vgmetadata(vginfo);
> vg_release(vg);
> return_NULL;
Ack
We control metadata before write.
Zdenek
next prev parent reply other threads:[~2010-03-31 12:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-29 13:12 [PATCH 0/5] Fix some scaling problems for large VGs (many LVs) Milan Broz
2010-03-29 13:12 ` [PATCH 1/5] Use hash table for quick lv reference when reading metadata Milan Broz
2010-03-29 13:12 ` [PATCH 2/5] Remove vg_validate call when parsing cached metadata Milan Broz
2010-03-31 12:25 ` Zdenek Kabelac [this message]
2010-03-29 13:12 ` [PATCH 3/5] Optimise PV segments search Milan Broz
2010-03-29 13:12 ` [PATCH 4/5] Do not traverse PV segment list twice Milan Broz
2010-03-29 13:12 ` [PATCH 5/5] Fix all segments memory is allocated from vg private mempool Milan Broz
2010-03-31 12:35 ` [PATCH 0/5] Fix some scaling problems for large VGs (many LVs) Zdenek Kabelac
2010-03-31 15:06 ` Alasdair G Kergon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BB33F44.6040702@redhat.com \
--to=zkabelac@redhat.com \
--cc=lvm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.