summaryrefslogtreecommitdiffstats
path: root/lib/format1/import-export.c
diff options
context:
space:
mode:
authorAlasdair Kergon <agk@redhat.com>2005-04-19 20:58:25 +0000
committerAlasdair Kergon <agk@redhat.com>2005-04-19 20:58:25 +0000
commitc54a94054024d3a0ffd90fa5b9de9602f4631e5d (patch)
tree4756be3862e76fb922434459b1f93ca755d26392 /lib/format1/import-export.c
parent41d7e56a021c421df1a696f01e0f642ea5317ec1 (diff)
downloadlvm2-c54a94054024d3a0ffd90fa5b9de9602f4631e5d.tar.gz
lvm2-c54a94054024d3a0ffd90fa5b9de9602f4631e5d.tar.xz
lvm2-c54a94054024d3a0ffd90fa5b9de9602f4631e5d.zip
Initial pv_segment code.
Diffstat (limited to 'lib/format1/import-export.c')
-rw-r--r--lib/format1/import-export.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/format1/import-export.c b/lib/format1/import-export.c
index 0fdb3e9f..a3d92328 100644
--- a/lib/format1/import-export.c
+++ b/lib/format1/import-export.c
@@ -26,6 +26,7 @@
#include "filter.h"
#include "toolcontext.h"
#include "segtype.h"
+#include "pv_alloc.h"
#include <time.h>
@@ -89,6 +90,13 @@ int import_pv(struct pool *mem, struct device *dev,
pv->pe_alloc_count = pvd->pe_allocated;
list_init(&pv->tags);
+ list_init(&pv->segments);
+ list_init(&pv->free_segments);
+
+ if (!alloc_pv_segment_whole_pv(mem, pv)) {
+ stack;
+ return 0;
+ }
return 1;
}