From 2cc4f3ca45e5cb20649c2733330977a2307e2e19 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 3 Jul 2012 10:20:58 +0200 Subject: libblock: Move read-ahead trigger check In case the read-ahead task has a higher priority than the reading task, this ensures that the read-ahead request is issued after the read miss is serviced. --- cpukit/libblock/src/bdbuf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpukit/libblock/src/bdbuf.c b/cpukit/libblock/src/bdbuf.c index 34150600bc..5b66656499 100644 --- a/cpukit/libblock/src/bdbuf.c +++ b/cpukit/libblock/src/bdbuf.c @@ -2083,7 +2083,6 @@ rtems_bdbuf_read (rtems_disk_device *dd, printf ("bdbuf:read: %" PRIu32 " (%" PRIu32 ") (dev = %08x)\n", media_block + dd->start, block, (unsigned) dd->dev); - rtems_bdbuf_check_read_ahead_trigger (dd, block); bd = rtems_bdbuf_get_buffer_for_access (dd, media_block); switch (bd->state) { @@ -2114,6 +2113,8 @@ rtems_bdbuf_read (rtems_disk_device *dd, rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_4); break; } + + rtems_bdbuf_check_read_ahead_trigger (dd, block); } rtems_bdbuf_unlock_cache (); -- cgit v1.2.3