All of lore.kernel.org
 help / color / mirror / Atom feed
* - do_mpage_readpage-remove-first_logical_block-parameter-fix.patch removed from -mm tree
@ 2008-12-10 20:29 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2008-12-10 20:29 UTC (permalink / raw)
  To: vagabon.xyz, mikevs, nickpiggin, mm-commits


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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-12-10 20:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-10 20:29 - do_mpage_readpage-remove-first_logical_block-parameter-fix.patch removed from -mm tree akpm

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.