]> sourceware.org Git - lvm2.git/commit
Keep the cache content when the exported vg buffer is matching
authorZdenek Kabelac <zkabelac@redhat.com>
Wed, 30 Mar 2011 13:14:34 +0000 (13:14 +0000)
committerZdenek Kabelac <zkabelac@redhat.com>
Wed, 30 Mar 2011 13:14:34 +0000 (13:14 +0000)
commit954464e5aa09ba8930c64cff24ba917fd9b7e95d
tree2e8d3f8eb64a08731f5344d36fedf92f47d63a79
parent57f9272a6a4d0b9202503f3cca9e5ee1307ced72
Keep the cache content when the exported vg buffer is matching

Instead of regenerating config tree and parsing same data again,
check whether export_vg_to_buffer does not produce same string as
the one already cached - in this case keep it, otherwise throw cached
content away.

For the code simplicity calling _free_cached_vgmetadata() with
vgmetadata == NULL as the function handles this itself.

Note: sometimes export_vg_to_buffer() generates almost the same data
with just different time stamp, but for the patch simplicity,
data are reparsed in this case.

This patch currently helps for vgrefresh.
WHATS_NEW
lib/cache/lvmcache.c
lib/cache/lvmcache.h
This page took 0.039538 seconds and 5 git commands to generate.