]> sourceware.org Git - lvm2.git/commitdiff
If lv isn't active, skip reactivation.
authorAlasdair Kergon <agk@redhat.com>
Fri, 25 Jan 2002 22:58:01 +0000 (22:58 +0000)
committerAlasdair Kergon <agk@redhat.com>
Fri, 25 Jan 2002 22:58:01 +0000 (22:58 +0000)
tools/lvresize.c

index 8511d51793ed637efe6463a8c90a1edd5117c097..07f1a636cee231845dee6b789dea175c1dd1001f 100644 (file)
@@ -37,6 +37,7 @@ int lvresize(int argc, char **argv)
        struct list *pvh, *segh;
        struct lv_list *lvl;
        int opt = 0;
+       int active;
 
        enum {
                LV_ANY = 0,
@@ -314,6 +315,9 @@ int lvresize(int argc, char **argv)
                        return ECMD_FAILED;
        }
 
+
+       active = lv_active(lv);
+
 /********* FIXME Suspend lv  ***********/
 
        /* store vg on disk(s) */
@@ -322,8 +326,7 @@ int lvresize(int argc, char **argv)
 
         backup(vg);
 
-       /* FIXME Ensure it always displays errors? */
-       if (!lv_reactivate(lv))
+       if (active && !lv_reactivate(lv))
                return ECMD_FAILED;
 
 /********* FIXME Resume *********/
This page took 0.03927 seconds and 5 git commands to generate.