Lines Matching full:swap
3 * linux/kernel/power/swap.c
6 * and writing it to a swap partition.
23 #include <linux/swap.h>
48 * The swap map is a data structure used for keeping track of each page
49 * written to a swap partition. It consists of many swap_map_page
50 * structures that contain each an array of MAP_PAGE_ENTRIES swap entries.
51 * These structures are stored on the swap and linked together with the
54 * The swap map is created during suspend. The swap map pages are
91 * The swap_map_handle structure is used for handling swap in
119 * swap pages, so that they can be freed in case of an error.
172 * alloc_swapdev_block - allocate a swap page and register that it has
176 sector_t alloc_swapdev_block(int swap) in alloc_swapdev_block() argument
180 offset = swp_offset(get_swap_page_of_type(swap)); in alloc_swapdev_block()
183 swap_free(swp_entry(swap, offset)); in alloc_swapdev_block()
185 return swapdev_block(swap, offset); in alloc_swapdev_block()
191 * free_all_swap_pages - free swap pages allocated for saving image data.
192 * It also frees the extents used to register which swap entries had been
196 void free_all_swap_pages(int swap) in free_all_swap_pages() argument
207 swap_free(swp_entry(swap, offset)); in free_all_swap_pages()
251 pr_alert("Read-error on swap-device (%u:%u:%Lu)\n", in hib_end_io()
322 if (!memcmp("SWAP-SPACE",swsusp_header->sig, 10) || in mark_swapfiles()
333 pr_err("Swap header not found!\n"); in mark_swapfiles()
340 * swsusp_swap_check - check if the resume device is a swap device
370 * write_page - Write one page to given swap location.
372 * @offset: Offset of the swap page we're writing to.
424 pr_err("Cannot find swap device, try swapon -a\n"); in get_swap_writer()
671 * @handle: Swap map handle to use for saving the image.
884 * enough_swap - Make sure we have enough swap to save the image.
886 * Returns TRUE or FALSE after checking the total amount of swap
895 pr_debug("Free swap pages: %u\n", free_swap); in enough_swap()
922 pr_err("Cannot get swap writer\n"); in swsusp_write()
927 pr_err("Not enough free swap\n"); in swsusp_write()
953 * The following functions allow us to read data using a swap map
1054 * load_image - load the image using the swap map handle
1161 * @handle: Swap map handle to use for loading data.
1538 /* Reset swap signature now */ in swsusp_check()
1562 * swsusp_close - close swap device.