From: Arne Jansen <sensille@gmx.net>
To: chris.mason@oracle.com, linux-btrfs@vger.kernel.org
Subject: [PATCH] btrfs scrub: don't coalesce pages that are logically discontiguous
Date: Wed, 25 May 2011 14:22:50 +0200 [thread overview]
Message-ID: <1306326170-28208-1-git-send-email-sensille@gmx.net> (raw)
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>
---
fs/btrfs/scrub.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index a31f2a9..21ee93c 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -631,7 +631,8 @@ again:
if (sbio->count == 0) {
sbio->physical = physical;
sbio->logical = logical;
- } else if (sbio->physical + sbio->count * PAGE_SIZE != physical) {
+ } else if (sbio->physical + sbio->count * PAGE_SIZE != physical ||
+ sbio->logical + sbio->count * PAGE_SIZE != logical) {
scrub_submit(sdev);
goto again;
}
--
1.7.3.4
next reply other threads:[~2011-05-25 12:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-25 12:22 Arne Jansen [this message]
2011-05-25 12:31 ` [PATCH] btrfs scrub: don't coalesce pages that are logically discontiguous Arne Jansen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1306326170-28208-1-git-send-email-sensille@gmx.net \
--to=sensille@gmx.net \
--cc=chris.mason@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.