Messages in this thread Patch in this message | | | From | Nigel Cunningham <> | Subject | [Suspend2][ 18/19] [Suspend2] Read pageset2. | Date | Tue, 27 Jun 2006 08:36:59 +1000 |
| |
(Re)read pageset2 data when cancelling a suspend after the atomic copy, or when resuming.
Signed-off-by: Nigel Cunningham <nigel@suspend2.net>
kernel/power/io.c | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/kernel/power/io.c b/kernel/power/io.c index cd99bd8..6a8badf 100644 --- a/kernel/power/io.c +++ b/kernel/power/io.c @@ -971,3 +971,27 @@ out: return output_buffer; } +/* read_pageset2() + * + * Description: Read in part or all of pageset2 of an image, depending upon + * whether we are suspending and have only overwritten a portion + * with pageset1 pages, or are resuming and need to read them + * all. + * Arguments: Int. Boolean. Read only pages which would have been + * overwritten by pageset1? + * Returns: Int. Zero if no error, otherwise the error value. + */ +int read_pageset2(int overwrittenpagesonly) +{ + int result = 0; + + if (!pagedir2.pageset_size) + return 0; + + result = read_pageset(&pagedir2, 2, overwrittenpagesonly); + + suspend_update_status(100, 100, NULL); + suspend_cond_pause(1, "Pagedir 2 read."); + + return result; +} -- 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/
| |