mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Rename get_vgs() to get_vgnames() and clarify related error messages.
get_vgs() really returns a list of vgnames. In the future we will use get_vgs() to return a list of vg structures, similar to get_pvs().
This commit is contained in:
parent
fd5c5a9703
commit
4631e58782
@ -1,5 +1,6 @@
|
||||
Version 2.02.45 -
|
||||
===================================
|
||||
Rename get_vgs() to get_vgnames() and clarify related error messages.
|
||||
Allow clvmd to be built with all cluster managers & select one on cmdline.
|
||||
Mention --with-clvmd=corosync in ./configure.
|
||||
Replace internal vg_check_status() implementation.
|
||||
|
@ -370,7 +370,7 @@ struct physical_volume *pv_read(struct cmd_context *cmd, const char *pv_name,
|
||||
struct dm_list *get_pvs(struct cmd_context *cmd);
|
||||
|
||||
/* Set full_scan to 1 to re-read every (filtered) device label */
|
||||
struct dm_list *get_vgs(struct cmd_context *cmd, int full_scan);
|
||||
struct dm_list *get_vgnames(struct cmd_context *cmd, int full_scan);
|
||||
struct dm_list *get_vgids(struct cmd_context *cmd, int full_scan);
|
||||
int scan_vgs_for_pvs(struct cmd_context *cmd);
|
||||
|
||||
|
@ -2039,8 +2039,8 @@ static struct volume_group *_vg_read_by_vgid(struct cmd_context *cmd,
|
||||
* allowed to do a full scan here any more. */
|
||||
|
||||
// The slow way - full scan required to cope with vgrename
|
||||
if (!(vgnames = get_vgs(cmd, 2))) {
|
||||
log_error("vg_read_by_vgid: get_vgs failed");
|
||||
if (!(vgnames = get_vgnames(cmd, 2))) {
|
||||
log_error("vg_read_by_vgid: get_vgnames failed");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -2167,7 +2167,7 @@ static struct physical_volume *_pv_read(struct cmd_context *cmd,
|
||||
}
|
||||
|
||||
/* May return empty list */
|
||||
struct dm_list *get_vgs(struct cmd_context *cmd, int full_scan)
|
||||
struct dm_list *get_vgnames(struct cmd_context *cmd, int full_scan)
|
||||
{
|
||||
return lvmcache_get_vgnames(cmd, full_scan);
|
||||
}
|
||||
@ -2201,7 +2201,7 @@ static int _get_pvs(struct cmd_context *cmd, struct dm_list **pvslist)
|
||||
|
||||
/* Get list of VGs */
|
||||
if (!(vgids = get_vgids(cmd, 0))) {
|
||||
log_error("get_pvs: get_vgs failed");
|
||||
log_error("get_pvs: get_vgids failed");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -273,7 +273,7 @@ int process_each_lv(struct cmd_context *cmd, int argc, char **argv,
|
||||
|
||||
if (!argc || !dm_list_empty(&tags)) {
|
||||
log_verbose("Finding all logical volumes");
|
||||
if (!(vgnames = get_vgs(cmd, 0)) || dm_list_empty(vgnames)) {
|
||||
if (!(vgnames = get_vgnames(cmd, 0)) || dm_list_empty(vgnames)) {
|
||||
log_error("No volume groups found");
|
||||
return ret_max;
|
||||
}
|
||||
@ -713,7 +713,7 @@ int process_each_pv(struct cmd_context *cmd, int argc, char **argv,
|
||||
if (sigint_caught())
|
||||
return ret_max;
|
||||
}
|
||||
if (!dm_list_empty(&tags) && (vgnames = get_vgs(cmd, 0)) &&
|
||||
if (!dm_list_empty(&tags) && (vgnames = get_vgnames(cmd, 0)) &&
|
||||
!dm_list_empty(vgnames)) {
|
||||
dm_list_iterate_items(sll, vgnames) {
|
||||
if (!lock_vol(cmd, sll->str, lock_type)) {
|
||||
|
Loading…
Reference in New Issue
Block a user