]> sourceware.org Git - lvm2.git/commitdiff
Add max_pv and max_lv vg 'get' lvm2app exports.
authorDave Wysochanski <dwysocha@redhat.com>
Mon, 14 Sep 2009 15:45:23 +0000 (15:45 +0000)
committerDave Wysochanski <dwysocha@redhat.com>
Mon, 14 Sep 2009 15:45:23 +0000 (15:45 +0000)
lib/metadata/metadata-exported.h
lib/metadata/metadata.c
liblvm/lvm2app.h
liblvm/lvm_vg.c

index 2291ed0f48804b7552684991cd75e84a168ed730..1393aaeb3847c3d204e25787187cf02103e85981 100644 (file)
@@ -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)
 
index 935ebd48ef7fb4312596906b2a53e40208c02a8b..79e0016f823e82d921e18d5778eeb3345bf502d7 100644 (file)
@@ -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;
index aa73e059ac7688a0ec385c8f1919cf165b913f0b..d6b67ce5b3e2c9e0a778f85d709307a74b4a0caa 100644 (file)
@@ -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 *************************/
 
 /**
index 9e5f8db2510216ffbe9bb21a983562eb88f54e1d..dcfd722667da9feb35a153c614dd5ba1e02dd93c 100644 (file)
@@ -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)));
This page took 0.042648 seconds and 5 git commands to generate.