From 8c54f03db8730c3f8114549dbeefd00bfd5df785 Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Fri, 22 Nov 2002 14:19:56 +0000 Subject: [PATCH] Fix snapshot lvcreate activation check. --- tools/lvcreate.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tools/lvcreate.c b/tools/lvcreate.c index 59e9ed0ad..719541e75 100644 --- a/tools/lvcreate.c +++ b/tools/lvcreate.c @@ -399,14 +399,12 @@ static int _lvcreate(struct cmd_context *cmd, struct lvcreate_params *lp) lp->extents = lp->extents - size_rest + lp->stripes; } - if (!activation()) { - if (lp->snapshot) + if (lp->snapshot) { + if (!activation()) { log_error("Can't create snapshot without using " "device-mapper kernel driver"); - return 0; - } - - if (lp->snapshot) { + return 0; + } if (!(org = find_lv(vg, lp->origin))) { log_err("Couldn't find origin volume '%s'.", lp->origin);