From: wysochanski@sourceware.org <wysochanski@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2/liblvm .exported_symbols lvm.h lvm_lv.c
Date: 26 Jul 2009 14:36:53 -0000 [thread overview]
Message-ID: <20090726143653.16658.qmail@sourceware.org> (raw)
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: wysochanski at sourceware.org 2009-07-26 14:36:52
Modified files:
liblvm : .exported_symbols lvm.h lvm_lv.c
Log message:
Add lvm_vg_remove_lv liblvm function.
Add a very simple version of lvm_vg_remove_lv.
Since we currently can only create linear LVs, this simple remove function
is adequate. We must refactor lvremove_single a bit.
Author: Dave Wysochanski <dwysocha@redhat.com>
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/liblvm/.exported_symbols.diff?cvsroot=lvm2&r1=1.10&r2=1.11
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/liblvm/lvm.h.diff?cvsroot=lvm2&r1=1.15&r2=1.16
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/liblvm/lvm_lv.c.diff?cvsroot=lvm2&r1=1.3&r2=1.4
--- LVM2/liblvm/.exported_symbols 2009/07/26 13:06:59 1.10
+++ LVM2/liblvm/.exported_symbols 2009/07/26 14:36:52 1.11
@@ -30,3 +30,4 @@
lvm_list_vg_names
lvm_list_vg_ids
lvm_vg_create_lv_linear
+lvm_vg_remove_lv
--- LVM2/liblvm/lvm.h 2009/07/26 13:06:59 1.15
+++ LVM2/liblvm/lvm.h 2009/07/26 14:36:52 1.16
@@ -117,6 +117,17 @@
lv_t *lvm_vg_create_lv_linear(vg_t *vg, const char *name, uint64_t size);
/**
+ * Remove a logical volume from a volume group.
+ * This API commits the change to disk and does _not_ require calling
+ * lvm_vg_write.
+ * Currently only removing linear LVs are possible.
+ *
+ * FIXME: This API should probably not commit to disk but require calling
+ * lvm_vg_write.
+ */
+int lvm_vg_remove_lv(lv_t *lv);
+
+/**
* Return stored error no describing last LVM API error.
*
* Users of liblvm should use lvm_errno to determine success or failure
--- LVM2/liblvm/lvm_lv.c 2009/07/26 13:06:59 1.3
+++ LVM2/liblvm/lvm_lv.c 2009/07/26 14:36:52 1.4
@@ -96,3 +96,9 @@
return lvl->lv;
}
+int lvm_vg_remove_lv(lv_t *lv)
+{
+ if (!lv || !lv->vg || vg_read_error(lv->vg))
+ return 0;
+ return lv_remove_single(lv->vg->cmd, lv, DONT_PROMPT);
+}
next reply other threads:[~2009-07-26 14:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-26 14:36 wysochanski [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-07-26 20:58 LVM2/liblvm .exported_symbols lvm.h lvm_lv.c wysochanski
2009-07-26 20:57 wysochanski
2009-07-26 2:34 wysochanski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090726143653.16658.qmail@sourceware.org \
--to=wysochanski@sourceware.org \
--cc=lvm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.