Skip to contentSkip to conversation

LVM2/liblvm .exported_symbols lvm.h lvm_vg.c

PATCH [email protected] 1 participant 1 message Jul 23, 2009

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: wysochanski at sourceware.org 2009-07-23 23:39:02

Modified files:
liblvm : .exported_symbols lvm.h lvm_vg.c

Log message:
Add lvm_vg_list_{pvs|lvs} - return lists of pv/lv handles for a vg.

- Use vgmem pool to allocate a list of lvm_*_list structs
- Allocate a new list each call (list may have changed since last call)
- Add to liblvm's exported symbols

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/liblvm/.exported_symbols.diff?cvsroot=lvm2&r1=1.4&r2=1.5
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/liblvm/lvm.h.diff?cvsroot=lvm2&r1=1.8&r2=1.9
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/liblvm/lvm_vg.c.diff?cvsroot=lvm2&r1=1.4&r2=1.5

liblvm/.exported_symbols +2 -0
@@ -10,3 +10,5 @@
 lvm_vg_remove
 lvm_errno
 lvm_errmsg
+lvm_vg_list_pvs
+lvm_vg_list_lvs
liblvm/lvm.h +15 -0
@@ -44,6 +44,13 @@
 	lv_t *lv;
 } lv_list_t;
 
+/**
+ * Return a list of LV handles for a given VG handle.
+ *
+ * \return  A list of lv_list_t structures containing lv handles for this vg.
+ *          If no LVs exist on the given VG, NULL is returned.
+ */
+struct dm_list *lvm_vg_list_lvs(vg_t *vg);
 
 struct lvm; /* internal data */
 
@@ -225,4 +232,12 @@
 vg_t *lvm_vg_open(lvm_t libh, const char *vgname, const char *mode,
 		  uint32_t flags);
 
+/**
+ * Return a list of PV handles for a given VG handle.
+ *
+ * \return  A list of pv_list_t structures containing pv handles for this vg.
+ *          If no PVs exist on the given VG, NULL is returned.
+ */
+struct dm_list *lvm_vg_list_pvs(vg_t *vg);
+
 #endif /* _LIB_LVM_H */
liblvm/lvm_vg.c +52 -0

55 lines not on this page · raw message