The name did not clearly represent what it does.
used_cached_metadata = 1;
/* FIXME 64-bit */
- if (!text_vgname_import(fmt, dev_area->dev,
+ if (!text_vgsummary_import(fmt, dev_area->dev,
(off_t) (dev_area->start + rlocn->offset),
(uint32_t) (rlocn->size - wrap),
(off_t) (dev_area->start + MDA_HEADER_SIZE),
unsigned allow_lvmetad_extensions);
void (*read_desc) (struct dm_pool * mem, const struct dm_config_tree *cf,
time_t *when, char **desc);
- int (*read_vgname) (const struct format_type *fmt,
- const struct dm_config_tree *cft,
- struct lvmcache_vgsummary *vgsummary);
+ int (*read_vgsummary) (const struct format_type *fmt,
+ const struct dm_config_tree *cft,
+ struct lvmcache_vgsummary *vgsummary);
};
struct text_vg_version_ops *text_vg_vsn1_init(void);
uint32_t checksum,
time_t *when, char **desc);
-int text_vgname_import(const struct format_type *fmt,
+int text_vgsummary_import(const struct format_type *fmt,
struct device *dev,
off_t offset, uint32_t size,
off_t offset2, uint32_t size2,
/*
* Find out vgname on a given device.
*/
-int text_vgname_import(const struct format_type *fmt,
+int text_vgsummary_import(const struct format_type *fmt,
struct device *dev,
off_t offset, uint32_t size,
off_t offset2, uint32_t size2,
if (!(*vsn)->check_version(cft))
continue;
- if (!(*vsn)->read_vgname(fmt, cft, vgsummary))
+ if (!(*vsn)->read_vgsummary(fmt, cft, vgsummary))
goto_out;
r = 1;
}
/*
- * It would be more accurate to call this _read_vgsummary().
* It is used to read vgsummary information about a VG
* before locking and reading the VG via vg_read().
+ * read_vgsummary: read VG metadata before VG is locked
+ * and save the data in struct vgsummary
+ * read_vg: read VG metadata after VG is locked
+ * and save the data in struct volume_group
+ * FIXME: why are these separate?
*/
-static int _read_vgname(const struct format_type *fmt, const struct dm_config_tree *cft,
- struct lvmcache_vgsummary *vgsummary)
+static int _read_vgsummary(const struct format_type *fmt, const struct dm_config_tree *cft,
+ struct lvmcache_vgsummary *vgsummary)
{
const struct dm_config_node *vgn;
struct dm_pool *mem = fmt->cmd->mem;
.check_version = _vsn1_check_version,
.read_vg = _read_vg,
.read_desc = _read_desc,
- .read_vgname = _read_vgname,
+ .read_vgsummary = _read_vgsummary
};
struct text_vg_version_ops *text_vg_vsn1_init(void)