diff options
-rw-r--r-- | mm/readahead.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mm/readahead.c b/mm/readahead.c index 16378b90843e..d7c6e143a129 100644 --- a/mm/readahead.c +++ b/mm/readahead.c | |||
@@ -421,6 +421,16 @@ ondemand_readahead(struct address_space *mapping, | |||
421 | ra->async_size = ra->size > req_size ? ra->size - req_size : ra->size; | 421 | ra->async_size = ra->size > req_size ? ra->size - req_size : ra->size; |
422 | 422 | ||
423 | readit: | 423 | readit: |
424 | /* | ||
425 | * Will this read hit the readahead marker made by itself? | ||
426 | * If so, trigger the readahead marker hit now, and merge | ||
427 | * the resulted next readahead window into the current one. | ||
428 | */ | ||
429 | if (offset == ra->start && ra->size == ra->async_size) { | ||
430 | ra->async_size = get_next_ra_size(ra, max); | ||
431 | ra->size += ra->async_size; | ||
432 | } | ||
433 | |||
424 | return ra_submit(ra, mapping, filp); | 434 | return ra_submit(ra, mapping, filp); |
425 | } | 435 | } |
426 | 436 | ||