Lines Matching defs:swap

3  * linux/kernel/power/swap.c
6 * and writing it to a swap partition.
23 #include <linux/swap.h>
49 * The swap map is a data structure used for keeping track of each page
50 * written to a swap partition. It consists of many swap_map_page
51 * structures that contain each an array of MAP_PAGE_ENTRIES swap entries.
52 * These structures are stored on the swap and linked together with the
55 * The swap map is created during suspend. The swap map pages are
92 * The swap_map_handle structure is used for handling swap in
121 * swap pages, so that they can be freed in case of an error.
174 * alloc_swapdev_block - allocate a swap page and register that it has
178 sector_t alloc_swapdev_block(int swap)
182 offset = swp_offset(get_swap_page_of_type(swap));
185 swap_free(swp_entry(swap, offset));
187 return swapdev_block(swap, offset);
193 * free_all_swap_pages - free swap pages allocated for saving image data.
194 * It also frees the extents used to register which swap entries had been
198 void free_all_swap_pages(int swap)
207 swap_free_nr(swp_entry(swap, ext->start),
252 pr_alert("Read-error on swap-device (%u:%u:%Lu)\n",
340 * swsusp_swap_check - check if the resume device is a swap device
366 * write_page - Write one page to given swap location.
368 * @offset: Offset of the swap page we're writing to.
414 pr_err("Cannot find swap device, try swapon -a\n");
908 * enough_swap - Make sure we have enough swap to save the image.
910 * Returns TRUE or FALSE after checking the total amount of swap
919 pr_debug("Free swap pages: %u\n", free_swap);
946 pr_err("Cannot get swap writer\n");
951 pr_err("Not enough free swap\n");
977 * The following functions allow us to read data using a swap map
1081 * load_image - load the image using the swap map handle
1589 /* Reset swap signature now */