summaryrefslogtreecommitdiffstats
path: root/mm/readahead.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2010-02-28 23:55:20 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-02-28 23:55:20 -0800
commit35858adbfca13678af99fb31618ef4428d6dedb0 (patch)
tree3336feaa61324486945816cb52c347733e7c0821 /mm/readahead.c
parent197d4db752e67160d79fed09968c2140376a80a3 (diff)
parent4b70858ba8d4537daf782defebe5f2ff80ccef2b (diff)
downloadlinux-stable-35858adbfca13678af99fb31618ef4428d6dedb0.tar.gz
linux-stable-35858adbfca13678af99fb31618ef4428d6dedb0.tar.bz2
linux-stable-35858adbfca13678af99fb31618ef4428d6dedb0.zip
Merge branch 'next' into for-linus
Diffstat (limited to 'mm/readahead.c')
-rw-r--r--mm/readahead.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/mm/readahead.c b/mm/readahead.c
index aa1aa2345235..033bc135a41f 100644
--- a/mm/readahead.c
+++ b/mm/readahead.c
@@ -547,5 +547,17 @@ page_cache_async_readahead(struct address_space *mapping,
/* do read-ahead */
ondemand_readahead(mapping, ra, filp, true, offset, req_size);
+
+#ifdef CONFIG_BLOCK
+ /*
+ * Normally the current page is !uptodate and lock_page() will be
+ * immediately called to implicitly unplug the device. However this
+ * is not always true for RAID conifgurations, where data arrives
+ * not strictly in their submission order. In this case we need to
+ * explicitly kick off the IO.
+ */
+ if (PageUptodate(page))
+ blk_run_backing_dev(mapping->backing_dev_info, NULL);
+#endif
}
EXPORT_SYMBOL_GPL(page_cache_async_readahead);