All of lore.kernel.org
 help / color / mirror / Atom feed
From: akpm@linux-foundation.org
To: vagabon.xyz@gmail.com, mikevs@xs4all.net,
	nickpiggin@yahoo.com.au, mm-commits@vger.kernel.org
Subject: - do_mpage_readpage-remove-first_logical_block-parameter-fix.patch removed from -mm tree
Date: Wed, 10 Dec 2008 12:29:14 -0800	[thread overview]
Message-ID: <200812102029.mBAKTEWT028458@imap1.linux-foundation.org> (raw)


The patch titled
     do_mpage_readpage-remove-first_logical_block-parameter-fix
has been removed from the -mm tree.  Its filename was
     do_mpage_readpage-remove-first_logical_block-parameter-fix.patch

This patch was dropped because it had testing failures

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: do_mpage_readpage-remove-first_logical_block-parameter-fix
From: Franck Bui-Huu <vagabon.xyz@gmail.com>

Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Miquel van Smoorenburg <mikevs@xs4all.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/mpage.c |   18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff -puN fs/mpage.c~do_mpage_readpage-remove-first_logical_block-parameter-fix fs/mpage.c
--- a/fs/mpage.c~do_mpage_readpage-remove-first_logical_block-parameter-fix
+++ a/fs/mpage.c
@@ -157,6 +157,19 @@ map_buffer_to_page(struct page *page, st
 }
 
 /*
+ * Since get_block() can map a range of pages, for all these pages the
+ * BH_Boundary flag will be set.  But we only need to push what I/O we
+ * have accumulated at the last block of this range.
+*/
+static int last_mapped_page(struct buffer_head *map_bh, struct page *page)
+{
+	pgoff_t map_index = map_bh->b_page->index;
+
+	return buffer_boundary(map_bh) &&
+		page->index >= map_index + (map_bh->b_size>>PAGE_CACHE_SHIFT);
+}
+
+/*
  * This is the worker routine which does all the work of mapping the disk
  * blocks and constructs largest possible bios, submits them for IO if the
  * blocks are not contiguous on the disk.
@@ -312,10 +325,7 @@ alloc_new:
 		goto alloc_new;
 	}
 
-	relative_block = block_in_file - *first_logical_block;
-	nblocks = map_bh->b_size >> blkbits;
-	if ((buffer_boundary(map_bh) && relative_block == nblocks) ||
-	    (first_hole != blocks_per_page))
+	if (last_mapped_page(map_bh, page) || first_hole != blocks_per_page)
 		bio = mpage_bio_submit(READ, bio);
 	else
 		*last_block_in_bio = blocks[blocks_per_page - 1];
_

Patches currently in -mm which might be from vagabon.xyz@gmail.com are

do_mpage_readpage-remove-first_logical_block-parameter-fix.patch


                 reply	other threads:[~2008-12-10 20:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200812102029.mBAKTEWT028458@imap1.linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikevs@xs4all.net \
    --cc=mm-commits@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    --cc=vagabon.xyz@gmail.com \
    /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.