]> sourceware.org Git - lvm2.git/commit
cache: Store metadata size and checksum.
authorAlasdair G Kergon <agk@redhat.com>
Wed, 18 Mar 2015 23:43:02 +0000 (23:43 +0000)
committerAlasdair G Kergon <agk@redhat.com>
Wed, 18 Mar 2015 23:43:02 +0000 (23:43 +0000)
commit6407d184d1d4ce491035fe4d9e3ebbe6aefaa394
treeb226cf0357aaf4455919be55d6682c3c02aa671a
parent19c3851d9cd251bdb7eccd47385dd37818161bf7
cache: Store metadata size and checksum.

Refactor the recent metadata-reading optimisation patches.

Remove the recently-added cache fields from struct labeller
and struct format_instance.

Instead, introduce struct lvmcache_vgsummary to wrap the VG information
that lvmcache holds and add the metadata size and checksum to it.

Allow this VG summary information to be looked up by metadata size +
checksum.  Adjust the debug log messages to make it clear when this
shortcut has been successful.

(This changes the optimisation slightly, and might be extendable
further.)

Add struct cached_vg_fmtdata to format-specific vg_read calls to
preserve state alongside the VG across separate calls and indicate
if the details supplied match, avoiding the need to read and
process the VG metadata again.
19 files changed:
WHATS_NEW
lib/cache/lvmcache.c
lib/cache/lvmcache.h
lib/cache/lvmetad.c
lib/config/config.c
lib/format1/format1.c
lib/format_pool/format_pool.c
lib/format_text/archiver.c
lib/format_text/format-text.c
lib/format_text/import-export.h
lib/format_text/import.c
lib/format_text/import_vsn1.c
lib/format_text/layout.h
lib/format_text/text_label.c
lib/label/label.c
lib/label/label.h
lib/metadata/metadata-exported.h
lib/metadata/metadata.c
lib/metadata/metadata.h
This page took 0.036031 seconds and 5 git commands to generate.