summaryrefslogtreecommitdiffstats
path: root/liblvm
diff options
context:
space:
mode:
authorDave Wysochanski <dwysocha@redhat.com>2009-07-27 21:00:50 +0000
committerDave Wysochanski <dwysocha@redhat.com>2009-07-27 21:00:50 +0000
commitee7e183f7efb1c6e72251ce6b5f5ad3d0e6b5c4a (patch)
tree072de2e461cbd4426cc9667710cd165f8e114a07 /liblvm
parentc533b9a305c50b6e7446d3f57758b19b0ec6970f (diff)
downloadlvm2-ee7e183f7efb1c6e72251ce6b5f5ad3d0e6b5c4a.tar.gz
lvm2-ee7e183f7efb1c6e72251ce6b5f5ad3d0e6b5c4a.tar.xz
lvm2-ee7e183f7efb1c6e72251ce6b5f5ad3d0e6b5c4a.zip
Add skeletons of lvm_lv_resize and lvm_pv_resize - not yet implemented.
These lower-priority interfaces are not currently implemented in liblvm but are on the TODO list in the near term. Author: Thomas Woerner <twoerner@redhat.com> Acked-by: Dave Wysochanski <dwysocha@redhat.com>
Diffstat (limited to 'liblvm')
-rw-r--r--liblvm/lvm.h24
-rw-r--r--liblvm/lvm_lv.c7
-rw-r--r--liblvm/lvm_pv.c7
3 files changed, 38 insertions, 0 deletions
diff --git a/liblvm/lvm.h b/liblvm/lvm.h
index 1247d44b..0602e1b5 100644
--- a/liblvm/lvm.h
+++ b/liblvm/lvm.h
@@ -565,6 +565,18 @@ uint64_t lvm_lv_is_active(const lv_t *lv);
*/
uint64_t lvm_lv_is_suspended(const lv_t *lv);
+/**
+ * Resize logical volume to new_size bytes.
+ *
+ * \param lv
+ * Logical volume handle.
+ * \param new_size
+ * New size in bytes.
+ * \return 0 (success) or -1 (failure).
+ *
+ */
+int lvm_lv_resize(const lv_t *lv, uint64_t new_size);
+
/************************** physical volume handling ************************/
/**
@@ -616,4 +628,16 @@ char *lvm_pv_get_name(const pv_t *pv);
*/
uint64_t lvm_pv_get_mda_count(const pv_t *pv);
+/**
+ * Resize physical volume to new_size bytes.
+ *
+ * \param pv
+ * Physical volume handle.
+ * \param new_size
+ * New size in bytes.
+ * \return 0 (success) or -1 (failure).
+ *
+ */
+int lvm_pv_resize(const pv_t *pv, uint64_t new_size);
+
#endif /* _LIB_LVM_H */
diff --git a/liblvm/lvm_lv.c b/liblvm/lvm_lv.c
index a2436ed4..08865ec5 100644
--- a/liblvm/lvm_lv.c
+++ b/liblvm/lvm_lv.c
@@ -173,3 +173,10 @@ int lvm_lv_deactivate(lv_t *lv)
}
return 0;
}
+
+int lvm_lv_resize(const lv_t *lv, uint64_t new_size)
+{
+ /* FIXME: add lv resize code here */
+ log_error("NOT IMPLEMENTED YET\n");
+ return -1;
+}
diff --git a/liblvm/lvm_pv.c b/liblvm/lvm_pv.c
index ea3cee34..872412cc 100644
--- a/liblvm/lvm_pv.c
+++ b/liblvm/lvm_pv.c
@@ -42,3 +42,10 @@ uint64_t lvm_pv_get_mda_count(const pv_t *pv)
{
return (uint64_t) pv_mda_count(pv);
}
+
+int lvm_pv_resize(const pv_t *pv, uint64_t new_size)
+{
+ /* FIXME: add pv resize code here */
+ log_error("NOT IMPLEMENTED YET\n");
+ return -1;
+}