]> sourceware.org Git - lvm2.git/commitdiff
use seg_type macro
authorAlasdair Kergon <agk@redhat.com>
Tue, 18 Oct 2005 13:45:25 +0000 (13:45 +0000)
committerAlasdair Kergon <agk@redhat.com>
Tue, 18 Oct 2005 13:45:25 +0000 (13:45 +0000)
lib/striped/striped.c

index a11e96422e10c39d216be1e94498ac0d75690680..84da3a0aa8c27197a3bc9ee9bd67d175bc603246 100644 (file)
@@ -112,8 +112,8 @@ static int _segments_compatible(struct lv_segment *first,
 
                /* FIXME Relax this to first area type != second area type */
                /*       plus the additional AREA_LV checks needed */
-               if ((first->areas[s].type != AREA_PV) ||
-                   (second->areas[s].type != AREA_PV))
+               if ((seg_type(first, s) != AREA_PV) ||
+                   (seg_type(second, s) != AREA_PV))
                        return 0;
 
                width = first->area_len;
@@ -142,7 +142,7 @@ static int _merge_segments(struct lv_segment *seg1, struct lv_segment *seg2)
        seg1->area_len += seg2->area_len;
 
        for (s = 0; s < seg1->area_count; s++)
-               if (seg1->areas[s].type == AREA_PV)
+               if (seg_type(seg1, s) == AREA_PV)
                        merge_pv_segments(seg_pvseg(seg1, s),
                                          seg_pvseg(seg2, s));
 
This page took 0.036683 seconds and 5 git commands to generate.