Re: Ibm Serveraid Problem with 2.4.25

From: Chuck Lever
Date: Tue Mar 02 2004 - 00:20:46 EST


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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/