Messages in this thread Patch in this message |  | | | Subject | [PATCH 16/16] GFS2: Exported functions | | From | Steven Whitehouse <> | | Date | Thu, 31 Aug 2006 14:43:44 +0100 |
| |
[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.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |