Lines Matching +full:start +full:- +full:up

1 // SPDX-License-Identifier: MIT
7 #include <linux/page-flags.h>
21 return handle - 1; in ttm_backup_handle_to_shmem_idx()
25 * ttm_backup_drop() - release memory associated with a handle
31 loff_t start = ttm_backup_handle_to_shmem_idx(handle); in ttm_backup_drop() local
33 start <<= PAGE_SHIFT; in ttm_backup_drop()
34 shmem_truncate_range(file_inode(backup), start, in ttm_backup_drop()
35 start + PAGE_SIZE - 1); in ttm_backup_drop()
39 * ttm_backup_copy_page() - Copy the contents of a previously backed
40 * up page
41 * @backup: The struct backup pointer used to back up the page.
43 * @handle: The handle returned when the page was backed up.
47 * -EINTR if @intr was set to true and a signal is pending.
52 struct address_space *mapping = backup->f_mapping; in ttm_backup_copy_page()
67 * ttm_backup_backup_page() - Backup a page
69 * @page: The page to back up.
84 * we're not allowed to start backup IO.
88 * Note: This function could be extended to back up a folio and
91 * the folio size- and usage.
98 struct address_space *mapping = backup->f_mapping; in ttm_backup_backup_page()
123 ret = mapping->a_ops->writepage(folio_file_page(to_folio, idx), &wbc); in ttm_backup_backup_page()
143 * ttm_backup_fini() - Free the struct backup resources after last use.
154 * ttm_backup_bytes_avail() - Report the approximate number of bytes of backup space
165 * The idea behind backing up to shmem is that shmem objects may in ttm_backup_bytes_avail()
167 * is no or low swap-space available. But the accuracy of this in ttm_backup_bytes_avail()
168 * number also depends on shmem actually swapping out backed-up in ttm_backup_bytes_avail()
176 * ttm_backup_shmem_create() - Create a shmem-based struct backup.
177 * @size: The maximum size (in bytes) to back up.