GFS2: Exported functions
Subsystems (2)
PATCH 16/16 GFS2: Exported functions
[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 <[email protected]>
Signed-off-by David Teigland <[email protected]>
mm/filemap.c | 3 ++- mm/readahead.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-)
mm/filemap.c +2 -1
@@ -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 ;
mm/readahead.c +1 -0
@@ -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.