Skip to contentSkip to conversation

LVM2/liblvm .exported_symbols lvm.h lvm_lv.c

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

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: wysochanski at sourceware.org 2009-07-26 02:34:36

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

Log message:
Add lvm_vg_create_lv_linear liblvm function.

Create a default linear logical volume from a volume group.

Author: Dave Wysochanski <[email protected]>

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/liblvm/.exported_symbols.diff?cvsroot=lvm2&r1=1.8&r2=1.9
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/liblvm/lvm.h.diff?cvsroot=lvm2&r1=1.13&r2=1.14
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/liblvm/lvm_lv.c.diff?cvsroot=lvm2&r1=1.1&r2=1.2

liblvm/.exported_symbols +1 -0
@@ -21,3 +21,4 @@
 lvm_vg_list_lvs
 lvm_list_vg_names
 lvm_list_vg_ids
+lvm_vg_create_lv_linear
liblvm/lvm.h +20 -0
@@ -97,6 +97,26 @@
 int lvm_reload_config(lvm_t libh);
 
 /**
+ * Create a linear logical volume.
+ * This API commits the change to disk and does _not_ require calling
+ * lvm_vg_write.
+ * FIXME: This API should probably not commit to disk but require calling
+ * lvm_vg_write.  However, this appears to be non-trivial change until
+ * lv_create_single is refactored by segtype.
+ *
+ * \param   vg
+ *          VG handle obtained from lvm_vg_create or lvm_vg_open.
+ *
+ * \param   name
+ *          Name of logical volume to create.
+ *
+ * \param   size
+ *          Size of logical volume in extents.
+ *
+ */
+lv_t *lvm_vg_create_lv_linear(vg_t *vg, const char *name, uint64_t size);
+
+/**
  * Return stored error no describing last LVM API error.
  *
  * Users of liblvm should use lvm_errno to determine success or failure
liblvm/lvm_lv.c +52 -0

61 lines not on this page · raw message