--- lvm-1.0.1-rc2-2.4.10.patch.orig Sun Sep 30 13:04:27 2001 +++ lvm-1.0.1-rc2-2.4.10.patch Sun Sep 30 13:06:59 2001 @@ -3043,7 +3043,7 @@ - lv_ptr->lv_current_pe[le].reads += pep1[le].reads; - lv_ptr->lv_current_pe[le].writes += pep1[le].writes; + if (old_lv->lv_stripes < 2) { /* linear logical volume */ -+ end = min(uint, old_lv->lv_current_le, new_lv->lv_current_le); ++ end = min(old_lv->lv_current_le, new_lv->lv_current_le); + for (l = 0; l < end; l++) { + new_lv->lv_current_pe[l].reads += + old_lv->lv_current_pe[l].reads; @@ -3065,7 +3065,7 @@ - i < lv_ptr->lv_stripes; i++) { + old_stripe_size = old_lv->lv_allocated_le / old_lv->lv_stripes; + new_stripe_size = new_lv->lv_allocated_le / new_lv->lv_stripes; -+ end = min(uint, old_stripe_size, new_stripe_size); ++ end = min(old_stripe_size, new_stripe_size); + + for (i = source = dest = 0; i < new_lv->lv_stripes; i++) { for (j = 0; j < end; j++) { @@ -4146,8 +4146,8 @@ blksize_snap = lvm_get_blksize(snap_phys_dev); - max_blksize = max(blksize_org, blksize_snap); - min_blksize = min(blksize_org, blksize_snap); -+ max_blksize = max(int, blksize_org, blksize_snap); -+ min_blksize = min(int, blksize_org, blksize_snap); ++ max_blksize = max(blksize_org, blksize_snap); ++ min_blksize = min(blksize_org, blksize_snap); max_sectors = KIO_MAX_SECTORS * (min_blksize>>9); if (chunk_size % (max_blksize>>9)) @@ -4156,7 +4156,7 @@ while (chunk_size) { - nr_sectors = min(chunk_size, max_sectors); -+ nr_sectors = min(int, chunk_size, max_sectors); ++ nr_sectors = min(chunk_size, max_sectors); chunk_size -= nr_sectors; iobuf->length = nr_sectors << 9; @@ -4262,7 +4262,7 @@ buckets = lv->lv_remap_end; max_buckets = calc_max_buckets(); - buckets = min(buckets, max_buckets); -+ buckets = min(unsigned long, buckets, max_buckets); ++ buckets = min(buckets, max_buckets); while (buckets & (buckets-1)) buckets &= (buckets-1);