|
@@ -260,7 +260,7 @@ static void cache_rbio_pages(struct btrfs_raid_bio *rbio)
|
|
s = kmap(rbio->bio_pages[i]);
|
|
s = kmap(rbio->bio_pages[i]);
|
|
d = kmap(rbio->stripe_pages[i]);
|
|
d = kmap(rbio->stripe_pages[i]);
|
|
|
|
|
|
- memcpy(d, s, PAGE_SIZE);
|
|
|
|
|
|
+ copy_page(d, s);
|
|
|
|
|
|
kunmap(rbio->bio_pages[i]);
|
|
kunmap(rbio->bio_pages[i]);
|
|
kunmap(rbio->stripe_pages[i]);
|
|
kunmap(rbio->stripe_pages[i]);
|
|
@@ -1275,7 +1275,7 @@ static noinline void finish_rmw(struct btrfs_raid_bio *rbio)
|
|
pointers);
|
|
pointers);
|
|
} else {
|
|
} else {
|
|
/* raid5 */
|
|
/* raid5 */
|
|
- memcpy(pointers[nr_data], pointers[0], PAGE_SIZE);
|
|
|
|
|
|
+ copy_page(pointers[nr_data], pointers[0]);
|
|
run_xor(pointers + 1, nr_data - 1, PAGE_SIZE);
|
|
run_xor(pointers + 1, nr_data - 1, PAGE_SIZE);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1941,9 +1941,7 @@ static void __raid_recover_end_io(struct btrfs_raid_bio *rbio)
|
|
BUG_ON(failb != -1);
|
|
BUG_ON(failb != -1);
|
|
pstripe:
|
|
pstripe:
|
|
/* Copy parity block into failed block to start with */
|
|
/* Copy parity block into failed block to start with */
|
|
- memcpy(pointers[faila],
|
|
|
|
- pointers[rbio->nr_data],
|
|
|
|
- PAGE_SIZE);
|
|
|
|
|
|
+ copy_page(pointers[faila], pointers[rbio->nr_data]);
|
|
|
|
|
|
/* rearrange the pointer array */
|
|
/* rearrange the pointer array */
|
|
p = pointers[faila];
|
|
p = pointers[faila];
|
|
@@ -2448,7 +2446,7 @@ static noinline void finish_parity_scrub(struct btrfs_raid_bio *rbio,
|
|
pointers);
|
|
pointers);
|
|
} else {
|
|
} else {
|
|
/* raid5 */
|
|
/* raid5 */
|
|
- memcpy(pointers[nr_data], pointers[0], PAGE_SIZE);
|
|
|
|
|
|
+ copy_page(pointers[nr_data], pointers[0]);
|
|
run_xor(pointers + 1, nr_data - 1, PAGE_SIZE);
|
|
run_xor(pointers + 1, nr_data - 1, PAGE_SIZE);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2456,7 +2454,7 @@ static noinline void finish_parity_scrub(struct btrfs_raid_bio *rbio,
|
|
p = rbio_stripe_page(rbio, rbio->scrubp, pagenr);
|
|
p = rbio_stripe_page(rbio, rbio->scrubp, pagenr);
|
|
parity = kmap(p);
|
|
parity = kmap(p);
|
|
if (memcmp(parity, pointers[rbio->scrubp], PAGE_SIZE))
|
|
if (memcmp(parity, pointers[rbio->scrubp], PAGE_SIZE))
|
|
- memcpy(parity, pointers[rbio->scrubp], PAGE_SIZE);
|
|
|
|
|
|
+ copy_page(parity, pointers[rbio->scrubp]);
|
|
else
|
|
else
|
|
/* Parity is right, needn't writeback */
|
|
/* Parity is right, needn't writeback */
|
|
bitmap_clear(rbio->dbitmap, pagenr, 1);
|
|
bitmap_clear(rbio->dbitmap, pagenr, 1);
|