summaryrefslogtreecommitdiff
path: root/lib/format_text/archiver.c
diff options
context:
space:
mode:
authorAlasdair G Kergon <agk@redhat.com>2015-03-18 23:43:02 +0000
committerAlasdair G Kergon <agk@redhat.com>2015-03-18 23:43:02 +0000
commit6407d184d1d4ce491035fe4d9e3ebbe6aefaa394 (patch)
treeb226cf0357aaf4455919be55d6682c3c02aa671a /lib/format_text/archiver.c
parent19c3851d9cd251bdb7eccd47385dd37818161bf7 (diff)
downloadlvm2-6407d184d1d4ce491035fe4d9e3ebbe6aefaa394.tar.gz
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.
Diffstat (limited to 'lib/format_text/archiver.c')
-rw-r--r--lib/format_text/archiver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/format_text/archiver.c b/lib/format_text/archiver.c
index a2f40f2df..e3d3d570c 100644
--- a/lib/format_text/archiver.c
+++ b/lib/format_text/archiver.c
@@ -308,7 +308,7 @@ struct volume_group *backup_read_vg(struct cmd_context *cmd,
}
dm_list_iterate_items(mda, &tf->metadata_areas_in_use) {
- if (!(vg = mda->ops->vg_read(tf, vg_name, mda, 0)))
+ if (!(vg = mda->ops->vg_read(tf, vg_name, mda, NULL, NULL, 0)))
stack;
break;
}