[PATCH] swsusp: userland interface
authorRafael J. Wysocki <rjw@sisk.pl>
Thu, 23 Mar 2006 11:00:03 +0000 (03:00 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 23 Mar 2006 15:38:07 +0000 (07:38 -0800)
commit6e1819d615f24ce0726a7d0bd3dd0152d7b21654
treeabc68747446e8241a1a7103882b9f6b6e24fa274
parent543cc27d09643640cbc34189c03a40beb8227aef
[PATCH] swsusp: userland interface

This patch introduces a user space interface for swsusp.

The interface is based on a special character device, called the snapshot
device, that allows user space processes to perform suspend and resume-related
operations with the help of some ioctls and the read()/write() functions.
¬†Additionally it allows these processes to allocate free swap pages from a
selected swap partition, called the resume partition, so that they know which
sectors of the resume partition are available to them.

The interface uses the same low-level system memory snapshot-handling
functions that are used by the built-it swap-writing/reading code of swsusp.

The interface documentation is included in the patch.

The patch assumes that the major and minor numbers of the snapshot device will
be 10 (ie.  misc device) and 231, the registration of which has already been
requested.

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>
Documentation/power/userland-swsusp.txt [new file with mode: 0644]
init/do_mounts_initrd.c
kernel/power/Makefile
kernel/power/power.h
kernel/power/snapshot.c
kernel/power/user.c [new file with mode: 0644]
mm/swapfile.c