diff options
author | Milan Broz <mbroz@redhat.com> | 2009-05-12 19:12:09 +0000 |
---|---|---|
committer | Milan Broz <mbroz@redhat.com> | 2009-05-12 19:12:09 +0000 |
commit | 2f9a9d1a7f79f098593d95d308eabe18a57d200d (patch) | |
tree | 9470bc0f1a5800d050e8503fffa980fa7f8b9467 /tools | |
parent | 920e68d603a92fbbec1238420dc08da1c16f368e (diff) | |
download | lvm2-2f9a9d1a7f79f098593d95d308eabe18a57d200d.tar.gz lvm2-2f9a9d1a7f79f098593d95d308eabe18a57d200d.tar.xz lvm2-2f9a9d1a7f79f098593d95d308eabe18a57d200d.zip |
Remove snapshot_count from VG and use function instead.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/vgmerge.c | 2 | ||||
-rw-r--r-- | tools/vgsplit.c | 5 |
2 files changed, 1 insertions, 6 deletions
diff --git a/tools/vgmerge.c b/tools/vgmerge.c index c847c7ef..82c34561 100644 --- a/tools/vgmerge.c +++ b/tools/vgmerge.c @@ -102,8 +102,6 @@ static int _vgmerge_single(struct cmd_context *cmd, const char *vg_name_to, } vg_to->lv_count += vg_from->lv_count; - vg_to->snapshot_count += vg_from->snapshot_count; - vg_to->extent_count += vg_from->extent_count; vg_to->free_count += vg_from->free_count; diff --git a/tools/vgsplit.c b/tools/vgsplit.c index 87e74a4a..c4b583af 100644 --- a/tools/vgsplit.c +++ b/tools/vgsplit.c @@ -106,10 +106,7 @@ static int _move_one_lv(struct volume_group *vg_from, return 0; } - if (lv->status & SNAPSHOT) { - vg_from->snapshot_count--; - vg_to->snapshot_count++; - } else if (!lv_is_cow(lv)) { + if (!(lv->status & SNAPSHOT) && !lv_is_cow(lv)) { vg_from->lv_count--; vg_to->lv_count++; } |