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:
parent
d59a2b6109
commit
c8b0988586
@ -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
|
||||
|
3
lib/cache/lvmcache.c
vendored
3
lib/cache/lvmcache.c
vendored
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user