lkml.org 
[lkml]   [2004]   [Mar]   [2]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateTue, 2 Mar 2004 00:18:24 -0500 (EST)
FromChuck Lever <>
SubjectRe: Ibm Serveraid Problem with 2.4.25
hi marcelo-

this patch seems to address the extra read at the end of files or devices
that end exactly on a page boundary, while retaining the good readahead
characteristics of my original patch.  i'd like to hear about any testing
from folks who have one of:

  mpt fusion
  ips (ibm serveraid)
  promise ata (and maybe sata too)

this patch is against 2.4.26-pre1.


diff -X ../dont-diff -Naurp 00-stock/mm/filemap.c 01-readahead/mm/filemap.c
--- 00-stock/mm/filemap.c	2004-02-18 08:36:32.000000000 -0500
+++ 01-readahead/mm/filemap.c	2004-03-02 00:07:59.000000000 -0500
@@ -1285,7 +1285,8 @@ static void generic_file_readahead(int r
 	unsigned long raend;
 	int max_readahead = get_max_readahead(inode);

-	end_index = inode->i_size >> PAGE_CACHE_SHIFT;
+	end_index = ((inode->i_size + ~PAGE_CACHE_MASK) >>
+						PAGE_CACHE_SHIFT) - 1;

 	raend = filp->f_raend;
 	max_ahead = 0;

	- Chuck Lever
--
corporate:	<cel at netapp dot com>
personal:	<chucklever at bigfoot dot com>

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:01    [W:0.626 / U:0.270 seconds]
©2003-2008 Jasper Spaans