This patch removes 'struct physical_volume' from _check_contiguous. The pv can be obtained later by pva->map->pv. The patch doesn't fix any bug but is a preparation for later patch. diffstat: lib/metadata/lv_manip.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) Thanks, -- Jun'ichi Nomura, NEC Corporation of America
diff -X dontdiff -urp LVM2.03.regionsizefix/lib/metadata/lv_manip.c LVM2.04.shrink-checkcontig-arg/lib/metadata/lv_manip.c --- LVM2.03.regionsizefix/lib/metadata/lv_manip.c 2006-10-05 20:21:27.000000000 -0400 +++ LVM2.04.shrink-checkcontig-arg/lib/metadata/lv_manip.c 2006-10-07 00:46:29.000000000 -0400 @@ -690,8 +690,7 @@ static int _comp_area(const void *l, con /* * Is pva contiguous to any existing areas or on the same PV? */ -static int _check_contiguous(struct lv_segment *prev_lvseg, - struct physical_volume *pv, struct pv_area *pva, +static int _check_contiguous(struct lv_segment *prev_lvseg, struct pv_area *pva, struct pv_area **areas, uint32_t areas_size) { struct pv_segment *prev_pvseg; @@ -703,7 +702,7 @@ static int _check_contiguous(struct lv_s lastseg = list_item(list_last(&seg_lv(prev_lvseg, s)->segments), struct lv_segment); /* FIXME For more areas supply flattened prev_lvseg to ensure consistency */ if (lastseg->area_count == 1 && - _check_contiguous(lastseg, pv, pva, &areas[s], 1)) + _check_contiguous(lastseg, pva, &areas[s], 1)) return 1; continue; } @@ -711,7 +710,7 @@ static int _check_contiguous(struct lv_s if (!(prev_pvseg = seg_pvseg(prev_lvseg, s))) continue; /* FIXME Broken */ - if ((prev_pvseg->pv != pv)) + if ((prev_pvseg->pv != pva->map->pv)) continue; if (prev_pvseg->pe + prev_pvseg->len == pva->start) { @@ -907,7 +906,6 @@ static int _find_parallel_space(struct a if (contiguous) { if (prev_lvseg && _check_contiguous(prev_lvseg, - pvm->pv, pva, areas, areas_size)) { contiguous_count++;
_______________________________________________ linux-lvm mailing list linux-lvm@redhat.com https://www.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/