Re: [PATCH 3/4] readahead: factor out duplicated code

2005-02-03 Thread Oleg Nesterov
Ram wrote: > > unsigned long page_cache_readahead(mapping, ra, filp, offset, req_size) > > { > > unsigned long max, newsize = req_size; > > int sequential = (offset == ra->prev_page + 1); > > > > if (offset == ra->prev_page && req_size == 1 && ra->size != 0) > > goto out; >

Re: [PATCH 3/4] readahead: factor out duplicated code

2005-02-03 Thread Oleg Nesterov
Steven Pratt wrote: > > >+static int make_ahead_window(struct address_space *mapping, struct file > >*filp, > >+struct file_ra_state *ra, int force) > >+{ > >+int block, ret; > >+ > >+block = force || (ra->prev_page >= ra->ahead_start); > >+ret =

Re: [PATCH 3/4] readahead: factor out duplicated code

2005-02-03 Thread Oleg Nesterov
Steven Pratt wrote: +static int make_ahead_window(struct address_space *mapping, struct file *filp, +struct file_ra_state *ra, int force) +{ +int block, ret; + +block = force || (ra-prev_page = ra-ahead_start); +ret = blockable_page_cache_readahead(mapping, filp,

Re: [PATCH 3/4] readahead: factor out duplicated code

2005-02-03 Thread Oleg Nesterov
Ram wrote: unsigned long page_cache_readahead(mapping, ra, filp, offset, req_size) { unsigned long max, newsize = req_size; int sequential = (offset == ra-prev_page + 1); if (offset == ra-prev_page req_size == 1 ra-size != 0) goto out; ra-prev_page =

Re: [PATCH 3/4] readahead: factor out duplicated code

2005-02-02 Thread Ram
On Sat, 2005-01-29 at 03:35, Oleg Nesterov wrote: > > This patch introduces make_ahead_window() function for > > simplification of page_cache_readahead. > > If you will count this patch acceptable, I'll rediff it against > next mm iteration. > > For your convenience here is the code with the

Re: [PATCH 3/4] readahead: factor out duplicated code

2005-02-02 Thread Steven Pratt
Oleg Nesterov wrote: This patch introduces make_ahead_window() function for simplification of page_cache_readahead. Signed-off-by: Oleg Nesterov <[EMAIL PROTECTED]> --- 2.6.11-rc2/mm/readahead.c~ 2005-01-27 22:14:39.0 +0300 +++ 2.6.11-rc2/mm/readahead.c 2005-01-29 15:51:04.0

Re: [PATCH 3/4] readahead: factor out duplicated code

2005-02-02 Thread Steven Pratt
Oleg Nesterov wrote: This patch introduces make_ahead_window() function for simplification of page_cache_readahead. Signed-off-by: Oleg Nesterov [EMAIL PROTECTED] --- 2.6.11-rc2/mm/readahead.c~ 2005-01-27 22:14:39.0 +0300 +++ 2.6.11-rc2/mm/readahead.c 2005-01-29 15:51:04.0 +0300

Re: [PATCH 3/4] readahead: factor out duplicated code

2005-02-02 Thread Ram
On Sat, 2005-01-29 at 03:35, Oleg Nesterov wrote: This patch introduces make_ahead_window() function for simplification of page_cache_readahead. If you will count this patch acceptable, I'll rediff it against next mm iteration. For your convenience here is the code with the patch

Re: [PATCH 3/4] readahead: factor out duplicated code

2005-01-29 Thread Oleg Nesterov
> This patch introduces make_ahead_window() function for > simplification of page_cache_readahead. If you will count this patch acceptable, I'll rediff it against next mm iteration. For your convenience here is the code with the patch applied. int make_ahead_window(mapping, filp, ra, int force)

[PATCH 3/4] readahead: factor out duplicated code

2005-01-29 Thread Oleg Nesterov
This patch introduces make_ahead_window() function for simplification of page_cache_readahead. Signed-off-by: Oleg Nesterov <[EMAIL PROTECTED]> --- 2.6.11-rc2/mm/readahead.c~ 2005-01-27 22:14:39.0 +0300 +++ 2.6.11-rc2/mm/readahead.c 2005-01-29 15:51:04.0 +0300 @@ -406,6

[PATCH 3/4] readahead: factor out duplicated code

2005-01-29 Thread Oleg Nesterov
This patch introduces make_ahead_window() function for simplification of page_cache_readahead. Signed-off-by: Oleg Nesterov [EMAIL PROTECTED] --- 2.6.11-rc2/mm/readahead.c~ 2005-01-27 22:14:39.0 +0300 +++ 2.6.11-rc2/mm/readahead.c 2005-01-29 15:51:04.0 +0300 @@ -406,6 +406,37

Re: [PATCH 3/4] readahead: factor out duplicated code

2005-01-29 Thread Oleg Nesterov
This patch introduces make_ahead_window() function for simplification of page_cache_readahead. If you will count this patch acceptable, I'll rediff it against next mm iteration. For your convenience here is the code with the patch applied. int make_ahead_window(mapping, filp, ra, int force) {