diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2006-03-23 05:59:59 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-23 10:38:07 -0500 |
commit | f577eb30afdc68233f25d4d82b04102129262365 (patch) | |
tree | 25d3c2fa8dfbf42fd0d4776a36166736fcc1446a /include/linux/swap.h | |
parent | 2b322ce210aec74ae0d02938d3a01e29fe079469 (diff) |
[PATCH] swsusp: low level interface
Introduce the low level interface that can be used for handling the
snapshot of the system memory by the in-kernel swap-writing/reading code of
swsusp and the userland interface code (to be introduced shortly).
Also change the way in which swsusp records the allocated swap pages and,
consequently, simplifies the in-kernel swap-writing/reading code (this is
necessary for the userland interface too). To this end, it introduces two
helper functions in mm/swapfile.c, so that the swsusp code does not refer
directly to the swap internals.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/swap.h')
-rw-r--r-- | include/linux/swap.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/swap.h b/include/linux/swap.h index 12415dd94451..54eac8a39a4c 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -234,14 +234,15 @@ extern struct page * read_swap_cache_async(swp_entry_t, struct vm_area_struct *v | |||
234 | /* linux/mm/swapfile.c */ | 234 | /* linux/mm/swapfile.c */ |
235 | extern long total_swap_pages; | 235 | extern long total_swap_pages; |
236 | extern unsigned int nr_swapfiles; | 236 | extern unsigned int nr_swapfiles; |
237 | extern struct swap_info_struct swap_info[]; | ||
238 | extern void si_swapinfo(struct sysinfo *); | 237 | extern void si_swapinfo(struct sysinfo *); |
239 | extern swp_entry_t get_swap_page(void); | 238 | extern swp_entry_t get_swap_page(void); |
240 | extern swp_entry_t get_swap_page_of_type(int type); | 239 | extern swp_entry_t get_swap_page_of_type(int); |
241 | extern int swap_duplicate(swp_entry_t); | 240 | extern int swap_duplicate(swp_entry_t); |
242 | extern int valid_swaphandles(swp_entry_t, unsigned long *); | 241 | extern int valid_swaphandles(swp_entry_t, unsigned long *); |
243 | extern void swap_free(swp_entry_t); | 242 | extern void swap_free(swp_entry_t); |
244 | extern void free_swap_and_cache(swp_entry_t); | 243 | extern void free_swap_and_cache(swp_entry_t); |
244 | extern int swap_type_of(dev_t); | ||
245 | extern unsigned int count_swap_pages(int, int); | ||
245 | extern sector_t map_swap_page(struct swap_info_struct *, pgoff_t); | 246 | extern sector_t map_swap_page(struct swap_info_struct *, pgoff_t); |
246 | extern struct swap_info_struct *get_swap_info_struct(unsigned); | 247 | extern struct swap_info_struct *get_swap_info_struct(unsigned); |
247 | extern int can_share_swap_page(struct page *); | 248 | extern int can_share_swap_page(struct page *); |