linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] btrfs scrub: don't coalesce pages that are logically discontiguous
@ 2011-05-25 12:22 Arne Jansen
  2011-05-25 12:31 ` Arne Jansen
  0 siblings, 1 reply; 2+ messages in thread
From: Arne Jansen @ 2011-05-25 12:22 UTC (permalink / raw)
  To: chris.mason, linux-btrfs

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] btrfs scrub: don't coalesce pages that are logically discontiguous
  2011-05-25 12:22 [PATCH] btrfs scrub: don't coalesce pages that are logically discontiguous Arne Jansen
@ 2011-05-25 12:31 ` Arne Jansen
  0 siblings, 0 replies; 2+ messages in thread
From: Arne Jansen @ 2011-05-25 12:31 UTC (permalink / raw)
  To: chris.mason, linux-btrfs

On 25.05.2011 14:22, Arne Jansen wrote:
> 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.

This patch applies to the integration-test branch. I also pushed it
into my for-chris branch.

-Arne

> 
> 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;
>  	}


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-05-25 12:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-25 12:22 [PATCH] btrfs scrub: don't coalesce pages that are logically discontiguous Arne Jansen
2011-05-25 12:31 ` Arne Jansen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).