mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
rename function read_vgname to read_vgsummary
The name did not clearly represent what it does.
This commit is contained in:
parent
fe65a86cbc
commit
147c9c01a2
@ -1210,7 +1210,7 @@ int vgname_from_mda(const struct format_type *fmt,
|
|||||||
used_cached_metadata = 1;
|
used_cached_metadata = 1;
|
||||||
|
|
||||||
/* FIXME 64-bit */
|
/* 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),
|
(off_t) (dev_area->start + rlocn->offset),
|
||||||
(uint32_t) (rlocn->size - wrap),
|
(uint32_t) (rlocn->size - wrap),
|
||||||
(off_t) (dev_area->start + MDA_HEADER_SIZE),
|
(off_t) (dev_area->start + MDA_HEADER_SIZE),
|
||||||
|
@ -51,9 +51,9 @@ struct text_vg_version_ops {
|
|||||||
unsigned allow_lvmetad_extensions);
|
unsigned allow_lvmetad_extensions);
|
||||||
void (*read_desc) (struct dm_pool * mem, const struct dm_config_tree *cf,
|
void (*read_desc) (struct dm_pool * mem, const struct dm_config_tree *cf,
|
||||||
time_t *when, char **desc);
|
time_t *when, char **desc);
|
||||||
int (*read_vgname) (const struct format_type *fmt,
|
int (*read_vgsummary) (const struct format_type *fmt,
|
||||||
const struct dm_config_tree *cft,
|
const struct dm_config_tree *cft,
|
||||||
struct lvmcache_vgsummary *vgsummary);
|
struct lvmcache_vgsummary *vgsummary);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct text_vg_version_ops *text_vg_vsn1_init(void);
|
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,
|
uint32_t checksum,
|
||||||
time_t *when, char **desc);
|
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,
|
struct device *dev,
|
||||||
off_t offset, uint32_t size,
|
off_t offset, uint32_t size,
|
||||||
off_t offset2, uint32_t size2,
|
off_t offset2, uint32_t size2,
|
||||||
|
@ -35,7 +35,7 @@ static void _init_text_import(void)
|
|||||||
/*
|
/*
|
||||||
* Find out vgname on a given device.
|
* 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,
|
struct device *dev,
|
||||||
off_t offset, uint32_t size,
|
off_t offset, uint32_t size,
|
||||||
off_t offset2, uint32_t size2,
|
off_t offset2, uint32_t size2,
|
||||||
@ -74,7 +74,7 @@ int text_vgname_import(const struct format_type *fmt,
|
|||||||
if (!(*vsn)->check_version(cft))
|
if (!(*vsn)->check_version(cft))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!(*vsn)->read_vgname(fmt, cft, vgsummary))
|
if (!(*vsn)->read_vgsummary(fmt, cft, vgsummary))
|
||||||
goto_out;
|
goto_out;
|
||||||
|
|
||||||
r = 1;
|
r = 1;
|
||||||
|
@ -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
|
* It is used to read vgsummary information about a VG
|
||||||
* before locking and reading the VG via vg_read().
|
* 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,
|
static int _read_vgsummary(const struct format_type *fmt, const struct dm_config_tree *cft,
|
||||||
struct lvmcache_vgsummary *vgsummary)
|
struct lvmcache_vgsummary *vgsummary)
|
||||||
{
|
{
|
||||||
const struct dm_config_node *vgn;
|
const struct dm_config_node *vgn;
|
||||||
struct dm_pool *mem = fmt->cmd->mem;
|
struct dm_pool *mem = fmt->cmd->mem;
|
||||||
@ -1285,7 +1289,7 @@ static struct text_vg_version_ops _vsn1_ops = {
|
|||||||
.check_version = _vsn1_check_version,
|
.check_version = _vsn1_check_version,
|
||||||
.read_vg = _read_vg,
|
.read_vg = _read_vg,
|
||||||
.read_desc = _read_desc,
|
.read_desc = _read_desc,
|
||||||
.read_vgname = _read_vgname,
|
.read_vgsummary = _read_vgsummary
|
||||||
};
|
};
|
||||||
|
|
||||||
struct text_vg_version_ops *text_vg_vsn1_init(void)
|
struct text_vg_version_ops *text_vg_vsn1_init(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user