summaryrefslogtreecommitdiffstats
path: root/lib/format1
diff options
context:
space:
mode:
authorMilan Broz <mbroz@redhat.com>2009-05-13 21:21:58 +0000
committerMilan Broz <mbroz@redhat.com>2009-05-13 21:21:58 +0000
commit4b13d5a8238574d9af53b9131456d1f03f8d627e (patch)
tree846c5659e0286f936b6c3e231ccb1b0edcd832f3 /lib/format1
parent3a5d73beb06d0f9bf4b28862e3b661976656eaa1 (diff)
downloadlvm2-4b13d5a8238574d9af53b9131456d1f03f8d627e.tar.gz
lvm2-4b13d5a8238574d9af53b9131456d1f03f8d627e.tar.xz
lvm2-4b13d5a8238574d9af53b9131456d1f03f8d627e.zip
Fix snapshot segment import to not use duplicate segments & replace.
The snapshot segment (snapshotX) is created twice during the text metadata segment processing. This can cause temporary violation of max_lv count. Simplify the code, snapshot segment is properly initialized in init_snapshot_seg function now and do not need to be replaced by vg_add_snapshot call. The vg_add_snapshot() is now usefull only for adding new snapshot and it shares the same initialization function. The snapshot name is always generated, name paramater can be removed from function call.
Diffstat (limited to 'lib/format1')
-rw-r--r--lib/format1/import-export.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/format1/import-export.c b/lib/format1/import-export.c
index a950f9af..5d2e86ad 100644
--- a/lib/format1/import-export.c
+++ b/lib/format1/import-export.c
@@ -616,7 +616,7 @@ int import_snapshots(struct dm_pool *mem __attribute((unused)), struct volume_gr
continue;
/* insert the snapshot */
- if (!vg_add_snapshot(NULL, org, cow, NULL,
+ if (!vg_add_snapshot(org, cow, NULL,
org->le_count,
lvd->lv_chunk_size)) {
log_err("Couldn't add snapshot.");