summaryrefslogtreecommitdiff
path: root/lib/metadata/pv_map.c
diff options
context:
space:
mode:
authorJoe Thornber <thornber@redhat.com>2002-01-21 16:05:23 +0000
committerJoe Thornber <thornber@redhat.com>2002-01-21 16:05:23 +0000
commitcc282870ddab49f16c7477711baa770512e7ac8e (patch)
treef48ad93b52957bf41d3205574515f15b81582351 /lib/metadata/pv_map.c
parent751acb380099852d906252ca2366e8f2ba9d0178 (diff)
downloadlvm2-cc282870ddab49f16c7477711baa770512e7ac8e.tar.gz
o Changed
struct pv_list { struct list list; struct physical_volume pv; }; to struct pv_list { struct list list; struct physical_volume *pv; }; o New function in toollib 'create_pv_list', which creates a list of pv's from a given command line array of pv's. o Changed lvcreate/extend to use this (fixes lvextend [pv list] bug).
Diffstat (limited to 'lib/metadata/pv_map.c')
-rw-r--r--lib/metadata/pv_map.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/metadata/pv_map.c b/lib/metadata/pv_map.c
index a8a76948c..7f11b5897 100644
--- a/lib/metadata/pv_map.c
+++ b/lib/metadata/pv_map.c
@@ -17,7 +17,7 @@ static int _create_maps(struct pool *mem, struct list *pvs, struct list *maps)
struct pv_map *pvm;
list_iterate(tmp, pvs) {
- pv = &(list_item(tmp, struct pv_list)->pv);
+ pv = list_item(tmp, struct pv_list)->pv;
if (!(pv->status & ALLOCATABLE_PV))
continue;
@@ -47,8 +47,12 @@ static int _set_allocated(struct hash_table *hash,
struct pv_map *pvm;
if (!(pvm = (struct pv_map *) hash_lookup(hash, dev_name(pv->dev)))) {
- log_err("pv_map not present in hash table.");
- return 0;
+ /*
+ * it does matter that this fails, it just means
+ * this part of the lv is on a pv that we're not
+ * interested in allocating to.
+ */
+ return 1;
}
/* sanity check */