lkml.org 
[lkml]   [2006]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[Suspend2][ 22/32] [Suspend2] Move forward extra blocks in a page.
Date
Shift the pointer to the current block forward (n-1) blocks, where n is the
blocks per page used for this device.

Signed-off-by: Nigel Cunningham <nigel@suspend2.net>

kernel/power/suspend_block_io.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/kernel/power/suspend_block_io.c b/kernel/power/suspend_block_io.c
index 3902758..fbce186 100644
--- a/kernel/power/suspend_block_io.c
+++ b/kernel/power/suspend_block_io.c
@@ -780,3 +780,19 @@ static void suspend_set_devinfo(struct s
suspend_devinfo = info;
}

+static int forward_extra_blocks(void)
+{
+ int i;
+
+ for (i = 1; i < suspend_devinfo[suspend_writer_posn.current_chain].
+ blocks_per_page; i++)
+ suspend_extent_state_next(&suspend_writer_posn);
+
+ if (suspend_extent_state_eof(&suspend_writer_posn)) {
+ printk("Extent state eof.\n");
+ return -ENODATA;
+ }
+
+ return 0;
+}
+
--
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/

\
 
 \ /
  Last update: 2006-06-27 01:16    [W:0.115 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site