Lines Matching defs:mapping
17 static int afs_writepages_region(struct address_space *mapping,
30 bool afs_dirty_folio(struct address_space *mapping, struct folio *folio)
32 return fscache_dirty_folio(mapping, folio,
33 afs_vnode_cache(AFS_FS_I(mapping->host)));
50 static int afs_flush_conflicting_write(struct address_space *mapping,
61 return afs_writepages_region(mapping, &wbc, folio_pos(folio), LLONG_MAX,
68 int afs_write_begin(struct file *file, struct address_space *mapping,
87 ret = netfs_write_begin(&vnode->netfs, file, mapping, pos, len, &folio, fsdata);
130 ret = afs_flush_conflicting_write(mapping, folio);
153 int afs_write_end(struct file *file, struct address_space *mapping,
220 static void afs_kill_pages(struct address_space *mapping,
223 struct afs_vnode *vnode = AFS_FS_I(mapping->host);
234 folio = filemap_get_folio(mapping, index);
245 generic_error_remove_page(mapping, &folio->page);
258 struct address_space *mapping,
261 struct afs_vnode *vnode = AFS_FS_I(mapping->host);
272 folio = filemap_get_folio(mapping, index);
292 struct address_space *mapping = vnode->netfs.inode.i_mapping;
296 XA_STATE(xas, &mapping->i_pages, start / PAGE_SIZE);
461 static void afs_extend_writeback(struct address_space *mapping,
480 XA_STATE(xas, &mapping->i_pages, index);
581 static ssize_t afs_write_back_from_locked_folio(struct address_space *mapping,
586 struct afs_vnode *vnode = AFS_FS_I(mapping->host);
626 afs_extend_writeback(mapping, vnode, &count,
646 iov_iter_xarray(&iter, ITER_SOURCE, &mapping->i_pages, start, len);
652 fscache_clear_page_bits(mapping, start, len, caching);
673 afs_redirty_pages(wbc, mapping, start, len);
674 mapping_set_error(mapping, ret);
679 afs_redirty_pages(wbc, mapping, start, len);
680 mapping_set_error(mapping, -ENOSPC);
691 afs_kill_pages(mapping, start, len);
692 mapping_set_error(mapping, ret);
703 static int afs_writepages_region(struct address_space *mapping,
720 n = filemap_get_folios_tag(mapping, &index, end / PAGE_SIZE,
733 * (changing page->mapping to NULL), or even swizzled
734 * back from swapper_space to tmpfs file mapping
748 if (folio->mapping != mapping ||
781 ret = afs_write_back_from_locked_folio(mapping, wbc,
804 int afs_writepages(struct address_space *mapping,
807 struct afs_vnode *vnode = AFS_FS_I(mapping->host);
823 start = mapping->writeback_index * PAGE_SIZE;
824 ret = afs_writepages_region(mapping, wbc, start, LLONG_MAX,
827 mapping->writeback_index = next / PAGE_SIZE;
829 ret = afs_writepages_region(mapping, wbc, 0,
832 mapping->writeback_index =
837 ret = afs_writepages_region(mapping, wbc, 0, LLONG_MAX,
840 mapping->writeback_index = next / PAGE_SIZE;
842 ret = afs_writepages_region(mapping, wbc,