kernel-ark/include
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
..
acpi [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
asm-alpha
asm-arm WorkQueue: Fix up arch-specific work items where possible 2006-12-05 19:36:26 +00:00
asm-arm26 [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
asm-avr32 [PATCH] Centralise definitions of sector_t and blkcnt_t 2006-12-04 19:41:15 -08:00
asm-cris
asm-frv [PATCH] mm: pagefault_{disable,enable}() 2006-12-07 08:39:21 -08:00
asm-generic [PATCH] mm: pagefault_{disable,enable}() 2006-12-07 08:39:21 -08:00
asm-h8300 [PATCH] Centralise definitions of sector_t and blkcnt_t 2006-12-04 19:41:15 -08:00
asm-i386 [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
asm-ia64 [PATCH] numa node ids are int, page_to_nid and zone_to_nid should return int 2006-12-07 08:39:23 -08:00
asm-m32r
asm-m68k
asm-m68knommu [PATCH] m68knommu: remove FP conditionals in ucontext struct 2006-12-06 07:41:26 -08:00
asm-mips [PATCH] mm: k{,um}map_atomic() vs in_atomic() 2006-12-07 08:39:21 -08:00
asm-parisc [PATCH] mm: pagefault_{disable,enable}() 2006-12-07 08:39:21 -08:00
asm-powerpc [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
asm-ppc [PATCH] mm: pagefault_{disable,enable}() 2006-12-07 08:39:21 -08:00
asm-s390 [PATCH] Centralise definitions of sector_t and blkcnt_t 2006-12-04 19:41:15 -08:00
asm-sh sh: sh775x/titan fixes for irq header changes. 2006-12-06 12:05:02 +09:00
asm-sh64
asm-sparc
asm-sparc64 [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
asm-um
asm-v850
asm-x86_64 [PATCH] mm: pagefault_{disable,enable}() 2006-12-07 08:39:21 -08:00
asm-xtensa
crypto
keys
linux [PATCH] swsusp: use partition device and offset to identify swap areas 2006-12-07 08:39:27 -08:00
math-emu
media
mtd
net [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
pcmcia [PATCH] pcmcia: multifunction card handling fixes 2006-12-04 20:09:15 -05:00
rdma
rxrpc
scsi [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
sound Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2006-12-05 17:01:28 +00:00
video
Kbuild