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][ 02/35] [Suspend2] Filewriter set_devinfo patch.
Date
Tell the block io routines which device and blocks to use.

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

kernel/power/suspend_file.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/kernel/power/suspend_file.c b/kernel/power/suspend_file.c
index 525e482..36db6b8 100644
--- a/kernel/power/suspend_file.c
+++ b/kernel/power/suspend_file.c
@@ -94,3 +94,14 @@ enum {
MARK_RESUME_ATTEMPTED,
};

+static void set_devinfo(struct block_device *bdev, int target_blkbits)
+{
+ devinfo.bdev = bdev;
+ if (!target_blkbits) {
+ devinfo.bmap_shift = devinfo.blocks_per_page = 0;
+ } else {
+ devinfo.bmap_shift = target_blkbits - 9;
+ devinfo.blocks_per_page = (1 << (PAGE_SHIFT - target_blkbits));
+ }
+}
+
--
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:05    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site