* [PATCH] lvconvert: require pool arg to match thin or cache
@ 2014-09-02 21:35 David Teigland
0 siblings, 0 replies; only message in thread
From: David Teigland @ 2014-09-02 21:35 UTC (permalink / raw)
To: lvm-devel
A --thinpool arg should not be a cache pool, and
a --cachepool arg should not be a thin pool.
---
tools/lvconvert.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index ba7c4bad29b4..1e106cf3abf8 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -2867,6 +2867,16 @@ static int _lvconvert_pool(struct cmd_context *cmd,
return 0;
}
+ if (arg_str_value(cmd, cachepool_ARG, NULL) && lv_is_thin_pool(pool_lv)) {
+ log_error("Error: cachepool arg is a thin pool");
+ return 0;
+ }
+
+ if (arg_str_value(cmd, thinpool_ARG, NULL) && lv_is_cache_pool(pool_lv)) {
+ log_error("Error: thinpool arg is a cache pool");
+ return 0;
+ }
+
/* FIXME cache pool */
if (lv_is_thin_pool(pool_lv) && pool_is_active(pool_lv)) {
/* If any volume referencing pool active - abort here */
--
1.8.3.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-09-02 21:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-02 21:35 [PATCH] lvconvert: require pool arg to match thin or cache David Teigland
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.