kernel-ark/kernel/power
Rafael J. Wysocki 915bae9ebe [PATCH] swsusp: use partition device and offset to identify swap areas
The Linux kernel handles swap files almost in the same way as it handles swap
partitions and there are only two differences between these two types of swap
areas:

(1) swap files need not be contiguous,

(2) the header of a swap file is not in the first block of the partition
    that holds it.  From the swsusp's point of view (1) is not a problem,
    because it is already taken care of by the swap-handling code, but (2) has
    to be taken into consideration.

In principle the location of a swap file's header may be determined with the
help of appropriate filesystem driver.  Unfortunately, however, it requires
the filesystem holding the swap file to be mounted, and if this filesystem is
journaled, it cannot be mounted during a resume from disk.  For this reason we
need some other means by which swap areas can be identified.

For example, to identify a swap area we can use the partition that holds the
area and the offset from the beginning of this partition at which the swap
header is located.

The following patch allows swsusp to identify swap areas this way.  It changes
swap_type_of() so that it takes an additional argument representing an offset
of the swap header within the partition represented by its first argument.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:27 -08:00
..
console.c [PATCH] Fix build failure in recent pm_prepare_* changes. 2006-02-07 16:12:33 -08:00
disk.c [PATCH] swsusp: debugging 2006-11-03 12:27:58 -08:00
Kconfig Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6 2006-09-26 11:49:46 -07:00
main.c [PATCH] PM: Add pm_trace switch 2006-09-26 08:49:04 -07:00
Makefile [PATCH] Disable CPU hotplug during suspend 2006-09-26 08:48:59 -07:00
pm.c [PATCH] remove kernel/power/pm.c:pm_unregister_all() 2006-07-12 16:09:08 -07:00
power.h [PATCH] uswsusp: add pmops->{prepare,enter,finish} support (aka "platform mode") 2006-12-07 08:39:26 -08:00
poweroff.c WorkStruct: Pass the work_struct pointer instead of context data 2006-11-22 14:55:48 +00:00
process.c [PATCH] Make suspend possible with a traced process at a breakpoint 2006-08-06 08:57:45 -07:00
snapshot.c [PATCH] namespaces: utsname: use init_utsname when appropriate 2006-10-02 07:57:21 -07:00
swap.c [PATCH] swsusp: use partition device and offset to identify swap areas 2006-12-07 08:39:27 -08:00
swsusp.c Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6 2006-09-26 11:49:46 -07:00
user.c [PATCH] swsusp: use partition device and offset to identify swap areas 2006-12-07 08:39:27 -08:00