aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/scrub.c
diff options
context:
space:
mode:
authorArne Jansen <sensille@gmx.net>2011-05-25 08:22:50 -0400
committerChris Mason <chris.mason@oracle.com>2011-05-26 17:52:52 -0400
commit00d01bc17cc2807292303961519d9c005794eb1d (patch)
tree47816d90951550c55d9ec1fff51c365056986aa1 /fs/btrfs/scrub.c
parentc309df07868baa8b05d2a70637096465746fdbb5 (diff)
btrfs scrub: don't coalesce pages that are logically discontiguous
scrub_page collects several pages into one bio as long as they are physically contiguous. As we only save one logical address for the whole bio, don't collect pages that are physically contiguous but logically discontiguous. Signed-off-by: Arne Jansen <sensille@gmx.net> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/scrub.c')
-rw-r--r--fs/btrfs/scrub.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index 87a2f1273136..6dfed0c27ac3 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -631,7 +631,8 @@ again:
631 if (sbio->count == 0) { 631 if (sbio->count == 0) {
632 sbio->physical = physical; 632 sbio->physical = physical;
633 sbio->logical = logical; 633 sbio->logical = logical;
634 } else if (sbio->physical + sbio->count * PAGE_SIZE != physical) { 634 } else if (sbio->physical + sbio->count * PAGE_SIZE != physical ||
635 sbio->logical + sbio->count * PAGE_SIZE != logical) {
635 scrub_submit(sdev); 636 scrub_submit(sdev);
636 goto again; 637 goto again;
637 } 638 }