lkml.org 
[lkml]   [2006]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 27/28] readahead: remove size limit on read_ahead_kb
Make possible large readahead values harmless.  The stock readahead is
protected by always consulting the avaiable memory before applying this
number. Other readahead paths have already did so.

Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn>
Signed-off-by: Andrew Morton <akpm@osdl.org>
--- linux-2.6.19-rc5-mm2.orig/mm/readahead.c
+++ linux-2.6.19-rc5-mm2/mm/readahead.c
@@ -143,7 +143,7 @@ EXPORT_SYMBOL_GPL(file_ra_state_init);
*/
static inline unsigned long get_max_readahead(struct file_ra_state *ra)
{
- return ra->ra_pages;
+ return max_sane_readahead(ra->ra_pages);
}

static inline unsigned long get_min_readahead(struct file_ra_state *ra)
--
-
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: 2006-11-15 08:57    [W:0.073 / U:6.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site