public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@zip.com.au>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: [patch 9/18] enable direct-to-BIO readahead for ext3
Date: Sun, 26 May 2002 13:43:41 -0700	[thread overview]
Message-ID: <3CF148FD.D056DA0A@zip.com.au> (raw)



Turn on multipage no-buffers reads for ext3.



=====================================

--- 2.5.18/fs/ext3/inode.c~ext3-mpage-read	Sun May 26 12:37:52 2002
+++ 2.5.18-akpm/fs/ext3/inode.c	Sun May 26 12:37:52 2002
@@ -33,6 +33,7 @@
 #include <linux/quotaops.h>
 #include <linux/string.h>
 #include <linux/buffer_head.h>
+#include <linux/mpage.h>
 
 /*
  * SEARCH_FROM_ZERO forces each block allocation to search from the start
@@ -1340,9 +1341,15 @@ out_fail:
 
 static int ext3_readpage(struct file *file, struct page *page)
 {
-	return block_read_full_page(page,ext3_get_block);
+	return mpage_readpage(page, ext3_get_block);
 }
 
+static int
+ext3_readpages(struct address_space *mapping,
+		struct list_head *pages, unsigned nr_pages)
+{
+	return mpage_readpages(mapping, pages, nr_pages, ext3_get_block);
+}
 
 static int ext3_flushpage(struct page *page, unsigned long offset)
 {
@@ -1359,6 +1366,7 @@ static int ext3_releasepage(struct page 
 
 struct address_space_operations ext3_aops = {
 	readpage:	ext3_readpage,		/* BKL not held.  Don't need */
+	readpages:	ext3_readpages,		/* BKL not held.  Don't need */
 	writepage:	ext3_writepage,		/* BKL not held.  We take it */
 	sync_page:	block_sync_page,
 	prepare_write:	ext3_prepare_write,	/* BKL not held.  We take it */


-

                 reply	other threads:[~2002-05-26 20:43 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=3CF148FD.D056DA0A@zip.com.au \
    --to=akpm@zip.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox