mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Whitehouse <swhiteho@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Russell Cattelan <cattelan@redhat.com>,
	David Teigland <teigland@redhat.com>, Ingo Molnar <mingo@elte.hu>,
	hch@infradead.org
Subject: [PATCH 16/16] GFS2: Exported functions
Date: Thu, 31 Aug 2006 14:43:44 +0100	[thread overview]
Message-ID: <1157031824.3384.815.camel@quoit.chygwyn.com> (raw)

[PATCH 16/16] GFS2: Exported functions

Export the routine for initialising ra_state structure. This allows
GFS2 to use the standard kernel readahead when reading its internal
files. Also a modification to the read path for direct i/o allows
a 0 return from the direct i/o function provided by the filesystem
to result in a "normal" buffered i/o. GFS2 uses this in cases where
direct i/o isn't possible for some reason (e.g. the file is "stuffed"
and this not aligned on disk).


Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>


 mm/filemap.c   |    3 ++-
 mm/readahead.c |    1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -1181,7 +1181,8 @@ __generic_file_aio_read(struct kiocb *io
 				*ppos = pos + retval;
 		}
 		file_accessed(filp);
-		goto out;
+		if (retval != 0)
+			goto out;
 	}
 
 	retval = 0;
--- a/mm/readahead.c
+++ b/mm/readahead.c
@@ -38,6 +38,7 @@ file_ra_state_init(struct file_ra_state 
 	ra->ra_pages = mapping->backing_dev_info->ra_pages;
 	ra->prev_page = -1;
 }
+EXPORT_SYMBOL_GPL(file_ra_state_init);
 
 /*
  * Return max readahead size for this inode in number-of-pages.



             reply	other threads:[~2006-08-31 13:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-31 13:43 Steven Whitehouse [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-04-21 16:25 Steven Whitehouse

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=1157031824.3384.815.camel@quoit.chygwyn.com \
    --to=swhiteho@redhat.com \
    --cc=cattelan@redhat.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=teigland@redhat.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

all inboxes | Powered by JetHome®