mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-11 09:18:25 +03:00
Make vg_extend() format_instance * parameter internal to vg_extend()
This commit is contained in:
parent
bb6d3b6cfd
commit
a10afb1b98
@ -245,14 +245,13 @@ int vg_rename(struct cmd_context *cmd, struct volume_group *vg,
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int vg_extend(struct format_instance *fid,
|
int vg_extend(struct volume_group *vg, int pv_count, char **pv_names)
|
||||||
struct volume_group *vg, int pv_count, char **pv_names)
|
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* attach each pv */
|
/* attach each pv */
|
||||||
for (i = 0; i < pv_count; i++)
|
for (i = 0; i < pv_count; i++)
|
||||||
if (!_add_pv_to_vg(fid, vg, pv_names[i])) {
|
if (!_add_pv_to_vg(vg->fid, vg, pv_names[i])) {
|
||||||
log_error("Unable to add physical volume '%s' to "
|
log_error("Unable to add physical volume '%s' to "
|
||||||
"volume group '%s'.", pv_names[i], vg->name);
|
"volume group '%s'.", pv_names[i], vg->name);
|
||||||
return 0;
|
return 0;
|
||||||
@ -352,7 +351,7 @@ struct volume_group *vg_create(struct cmd_context *cmd, const char *vg_name,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* attach the pv's */
|
/* attach the pv's */
|
||||||
if (!vg_extend(vg->fid, vg, pv_count, pv_names))
|
if (!vg_extend(vg, pv_count, pv_names))
|
||||||
goto_bad;
|
goto_bad;
|
||||||
|
|
||||||
return vg;
|
return vg;
|
||||||
|
@ -461,8 +461,7 @@ struct volume_group *vg_create(struct cmd_context *cmd, const char *name,
|
|||||||
int vg_remove(struct volume_group *vg);
|
int vg_remove(struct volume_group *vg);
|
||||||
int vg_rename(struct cmd_context *cmd, struct volume_group *vg,
|
int vg_rename(struct cmd_context *cmd, struct volume_group *vg,
|
||||||
const char *new_name);
|
const char *new_name);
|
||||||
int vg_extend(struct format_instance *fi, struct volume_group *vg,
|
int vg_extend(struct volume_group *vg, int pv_count, char **pv_names);
|
||||||
int pv_count, char **pv_names);
|
|
||||||
int vg_change_pesize(struct cmd_context *cmd, struct volume_group *vg,
|
int vg_change_pesize(struct cmd_context *cmd, struct volume_group *vg,
|
||||||
uint32_t new_extent_size);
|
uint32_t new_extent_size);
|
||||||
int vg_split_mdas(struct cmd_context *cmd, struct volume_group *vg_from,
|
int vg_split_mdas(struct cmd_context *cmd, struct volume_group *vg_from,
|
||||||
|
@ -74,7 +74,7 @@ int vgextend(struct cmd_context *cmd, int argc, char **argv)
|
|||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
/* extend vg */
|
/* extend vg */
|
||||||
if (!vg_extend(vg->fid, vg, argc, argv))
|
if (!vg_extend(vg, argc, argv))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
/* ret > 0 */
|
/* ret > 0 */
|
||||||
|
Loading…
Reference in New Issue
Block a user