mirror of
git://sourceware.org/git/lvm2.git
synced 2025-02-27 01:57:55 +03:00
Add max_pv and max_lv vg 'get' lvm2app exports.
This commit is contained in:
parent
720eb0e91c
commit
1e954bc8ef
@ -717,6 +717,8 @@ uint64_t vg_extent_size(const struct volume_group *vg);
|
||||
uint64_t vg_extent_count(const struct volume_group *vg);
|
||||
uint64_t vg_free_count(const struct volume_group *vg);
|
||||
uint64_t vg_pv_count(const struct volume_group *vg);
|
||||
uint64_t vg_max_pv(const struct volume_group *vg);
|
||||
uint64_t vg_max_lv(const struct volume_group *vg);
|
||||
int vg_check_write_mode(struct volume_group *vg);
|
||||
#define vg_is_clustered(vg) (vg_status((vg)) & CLUSTERED)
|
||||
|
||||
|
@ -3525,6 +3525,16 @@ uint64_t vg_pv_count(const struct volume_group *vg)
|
||||
return (uint64_t) vg->pv_count;
|
||||
}
|
||||
|
||||
uint64_t vg_max_pv(const struct volume_group *vg)
|
||||
{
|
||||
return (uint64_t) vg->max_pv;
|
||||
}
|
||||
|
||||
uint64_t vg_max_lv(const struct volume_group *vg)
|
||||
{
|
||||
return (uint64_t) vg->max_lv;
|
||||
}
|
||||
|
||||
uint64_t lv_size(const struct logical_volume *lv)
|
||||
{
|
||||
return lv->size;
|
||||
|
@ -589,6 +589,28 @@ uint64_t lvm_vg_get_free_extent_count(const vg_t vg);
|
||||
*/
|
||||
uint64_t lvm_vg_get_pv_count(const vg_t vg);
|
||||
|
||||
/**
|
||||
* Get the maximum number of physical volumes allowed in a volume group.
|
||||
*
|
||||
* \param vg
|
||||
* VG handle obtained from lvm_vg_create or lvm_vg_open.
|
||||
*
|
||||
* \return
|
||||
* Maximum number of physical volumes allowed in a volume group.
|
||||
*/
|
||||
uint64_t lvm_vg_get_max_pv(const vg_t vg);
|
||||
|
||||
/**
|
||||
* Get the maximum number of logical volumes allowed in a volume group.
|
||||
*
|
||||
* \param vg
|
||||
* VG handle obtained from lvm_vg_create or lvm_vg_open.
|
||||
*
|
||||
* \return
|
||||
* Maximum number of logical volumes allowed in a volume group.
|
||||
*/
|
||||
uint64_t lvm_vg_get_max_lv(const vg_t vg);
|
||||
|
||||
/************************** logical volume handling *************************/
|
||||
|
||||
/**
|
||||
|
@ -274,6 +274,16 @@ uint64_t lvm_vg_get_pv_count(const vg_t vg)
|
||||
return vg_pv_count(vg);
|
||||
}
|
||||
|
||||
uint64_t lvm_vg_get_max_pv(const vg_t vg)
|
||||
{
|
||||
return vg_max_pv(vg);
|
||||
}
|
||||
|
||||
uint64_t lvm_vg_get_max_lv(const vg_t vg)
|
||||
{
|
||||
return vg_max_lv(vg);
|
||||
}
|
||||
|
||||
char *lvm_vg_get_uuid(const vg_t vg)
|
||||
{
|
||||
char uuid[64] __attribute((aligned(8)));
|
||||
|
Loading…
x
Reference in New Issue
Block a user