]> sourceware.org Git - lvm2.git/commitdiff
rename function read_vgname to read_vgsummary
authorDavid Teigland <teigland@redhat.com>
Tue, 9 Feb 2016 19:32:26 +0000 (13:32 -0600)
committerDavid Teigland <teigland@redhat.com>
Mon, 11 Apr 2016 18:07:48 +0000 (13:07 -0500)
The name did not clearly represent what it does.

lib/format_text/format-text.c
lib/format_text/import-export.h
lib/format_text/import.c
lib/format_text/import_vsn1.c

index 408e63c7063d5fdc5c39c226a379507e7d4f473b..6053610ee8cb2296a71be6e064bd1e1ae30d3665 100644 (file)
@@ -1210,7 +1210,7 @@ int vgname_from_mda(const struct format_type *fmt,
                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),
index 074b1181aeed7335b83dd4ca4412d4a8028af98b..c081c511c03aa03efe1b76bfbdf60a1cb74c388d 100644 (file)
@@ -51,9 +51,9 @@ struct text_vg_version_ops {
                                         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);
@@ -78,7 +78,7 @@ struct volume_group *text_vg_import_fd(struct format_instance *fid,
                                       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,
index 5b4f4a90a0a5be05b2abc3cc63f8b325c4079eb1..629884bbbf2d734d946e497c615e32087422c94d 100644 (file)
@@ -35,7 +35,7 @@ static void _init_text_import(void)
 /*
  * 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,
@@ -74,7 +74,7 @@ int text_vgname_import(const struct format_type *fmt,
                if (!(*vsn)->check_version(cft))
                        continue;
 
-               if (!(*vsn)->read_vgname(fmt, cft, vgsummary))
+               if (!(*vsn)->read_vgsummary(fmt, cft, vgsummary))
                        goto_out;
 
                r = 1;
index 3bf5f7b77cc4b1dac4383fe045b09690f11bc44e..22f519ebcf2f9d6c08c0501e03051e7dde906e9f 100644 (file)
@@ -1229,12 +1229,16 @@ static void _read_desc(struct dm_pool *mem,
 }
 
 /*
- * 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;
@@ -1285,7 +1289,7 @@ static struct text_vg_version_ops _vsn1_ops = {
        .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)
This page took 0.048222 seconds and 5 git commands to generate.