1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Remove vg_validate call when parsing cached metadata.

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).
This commit is contained in:
Milan Broz 2010-03-31 17:20:44 +00:00
parent d59a2b6109
commit c8b0988586
2 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.63 -
================================
Remove vg_validate call when parsing cached metadata.
Use hash table of LVs to speed up parsing of text metadata with many LVs.
Fix two messages, add a whitespace and parentheses
When dmeventd is not forking because of -d flag, don't kill the parent process

View File

@ -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;