Messages in this thread Patch in this message | | | From | Nigel Cunningham <> | Subject | [Suspend2][ 11/32] [Suspend2] Test whether readahead is ready. | Date | Tue, 27 Jun 2006 08:37:45 +1000 |
| |
Determine whether a particular page's readahead has completed.
Signed-off-by: Nigel Cunningham <nigel@suspend2.net>
kernel/power/suspend_block_io.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/kernel/power/suspend_block_io.c b/kernel/power/suspend_block_io.c index ae45fc3..f14939e 100644 --- a/kernel/power/suspend_block_io.c +++ b/kernel/power/suspend_block_io.c @@ -400,3 +400,17 @@ static void suspend_wait_on_readahead(in do_bio_wait(6); } +/* + * readahead_done + * + * Returns whether the readahead requested is ready. + */ + +static int suspend_readahead_ready(int readahead_index) +{ + int index = readahead_index / BITS_PER_LONG; + int bit = readahead_index - (index * BITS_PER_LONG); + + return test_bit(bit, &suspend_readahead_flags[index]); +} + -- 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/
| |