From a538e369db166e2b2bc4ef752e5c59a0b888f83e Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Thu, 10 Nov 2011 12:40:29 +0000 Subject: Thin move _read_activation_params check Since we finaly recognize thin creation only after _determine_snapshot_type() - move _read_activation_params() after it - so we can support lvcreate -an thin snapshot. --- tools/lvcreate.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'tools/lvcreate.c') diff --git a/tools/lvcreate.c b/tools/lvcreate.c index 9d035b8c..9c6150ce 100644 --- a/tools/lvcreate.c +++ b/tools/lvcreate.c @@ -789,9 +789,6 @@ static int _lvcreate_params(struct lvcreate_params *lp, return 0; } - if (!_read_activation_params(lp, cmd)) - return_0; - /* * Allocation parameters */ @@ -993,6 +990,15 @@ int lvcreate(struct cmd_context *cmd, int argc, char **argv) goto_out; } + /* + * Check activation parameters to support inactive thin snapshot creation + * FIXME: anything else needs to be moved past _determine_snapshot_type()? + */ + if (!_read_activation_params(&lp, cmd)) { + r = ECMD_FAILED; + goto_out; + } + if (!_update_extents_params(vg, &lp, &lcp)) { r = ECMD_FAILED; goto_out; -- cgit