Lines Matching refs:mapping

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