]> 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)
commitd992bbbaa383882511fd3f5038f619ff8ca589d4
tree2e8d3f8eb64a08731f5344d36fedf92f47d63a79
parenta66bff47f1e5c1bb9fc461917bf1d5abb9c77bc1
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.035911 seconds and 5 git commands to generate.