]> sourceware.org Git - lvm2.git/commitdiff
Maintain snapshot_count correctly.
authorAlasdair Kergon <agk@redhat.com>
Thu, 5 Dec 2002 22:30:39 +0000 (22:30 +0000)
committerAlasdair Kergon <agk@redhat.com>
Thu, 5 Dec 2002 22:30:39 +0000 (22:30 +0000)
lib/metadata/snapshot_manip.c

index 23aeb18d80d7f6cc3fca35ad508c06273a93a919..d5d5ab61eac8ee9ccc8f6ce449361e3445a18d98 100644 (file)
@@ -137,6 +137,7 @@ int vg_add_snapshot(struct logical_volume *origin,
        cow->status &= ~VISIBLE_LV;
        sl->snapshot = s;
        list_add(&origin->vg->snapshots, &sl->list);
+       origin->vg->snapshot_count++;
 
        return 1;
 }
@@ -151,6 +152,7 @@ int vg_remove_snapshot(struct volume_group *vg, struct logical_volume *cow)
 
                if (sl->snapshot->cow == cow) {
                        list_del(slh);
+                       vg->snapshot_count--;
                        return 1;
                }
        }
This page took 0.039691 seconds and 5 git commands to generate.