[Suspend2][ 7/9] [Suspend2] Extent state to the start.

Nigel Cunningham
2006-06-26T16:56:06Z

Reset an extent state to the start of the data.

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

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

diff --git a/kernel/power/extent.c b/kernel/power/extent.c
index 8cbb48a..248e4de 100644
--- a/kernel/power/extent.c
+++ b/kernel/power/extent.c
@@ -249,3 +249,14 @@ unsigned long suspend_extent_state_next(
return state->current_offset;
}

+/* suspend_extent_state_goto_start
+ *
+ * Find the first valid value in a group of chains.
+ */
+void suspend_extent_state_goto_start(struct extent_iterate_state *state)
+{
+ state->current_chain = -1;
+ state->current_extent = NULL;
+ state->current_offset = 0;
+}
+

--
Nigel Cunningham nigel at suspend2 dot net