Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 151507
b: refs/heads/master
c: 51daa88
h: refs/heads/master
i:
  151505: 574da82
  151503: c2f91bc
v: v3
  • Loading branch information
Wu Fengguang authored and Linus Torvalds committed Jun 17, 2009
1 parent 9d12423 commit 951bba1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 160334a0cfa8e578b718f81038026326845d07d7
refs/heads/master: 51daa88ebd8e0d437289f589af29d4b39379ea76
10 changes: 10 additions & 0 deletions trunk/mm/readahead.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,16 @@ ondemand_readahead(struct address_space *mapping,
ra->async_size = ra->size > req_size ? ra->size - req_size : ra->size;

readit:
/*
* Will this read hit the readahead marker made by itself?
* If so, trigger the readahead marker hit now, and merge
* the resulted next readahead window into the current one.
*/
if (offset == ra->start && ra->size == ra->async_size) {
ra->async_size = get_next_ra_size(ra, max);
ra->size += ra->async_size;
}

return ra_submit(ra, mapping, filp);
}

Expand Down

0 comments on commit 951bba1

Please sign in to comment.