Messages in this thread Patch in this message | | | From | Nigel Cunningham <> | Subject | [Suspend2][ 10/32] [Suspend2] Wait on readahead. | Date | Tue, 27 Jun 2006 08:37:42 +1000 |
| |
Wait for the next page of readahead to be complete.
Signed-off-by: Nigel Cunningham <nigel@suspend2.net>
kernel/power/suspend_block_io.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/kernel/power/suspend_block_io.c b/kernel/power/suspend_block_io.c index f9c883a..ae45fc3 100644 --- a/kernel/power/suspend_block_io.c +++ b/kernel/power/suspend_block_io.c @@ -385,3 +385,18 @@ static void wait_on_one_page(struct io_i do { do_bio_wait(3); } while (io_info->flags); } +/* + * wait_on_readahead + * + * Wait until a particular readahead is ready. + */ +static void suspend_wait_on_readahead(int readahead_index) +{ + int index = readahead_index / BITS_PER_LONG; + int bit = readahead_index - index * BITS_PER_LONG; + + /* read_ahead_index is the one we want to return */ + while (!test_bit(bit, &suspend_readahead_flags[index])) + do_bio_wait(6); +} + -- Nigel Cunningham nigel at suspend2 dot net - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |