Lines Matching refs:folio
66 struct folio **foliop, void **_fsdata);
79 static bool ceph_dirty_folio(struct address_space *mapping, struct folio *folio) in ceph_dirty_folio() argument
85 if (folio_test_dirty(folio)) { in ceph_dirty_folio()
87 mapping->host, folio, folio->index); in ceph_dirty_folio()
88 VM_BUG_ON_FOLIO(!folio_test_private(folio), folio); in ceph_dirty_folio()
115 mapping->host, folio, folio->index, in ceph_dirty_folio()
125 VM_WARN_ON_FOLIO(folio->private, folio); in ceph_dirty_folio()
126 folio_attach_private(folio, snapc); in ceph_dirty_folio()
128 return ceph_fscache_dirty_folio(mapping, folio); in ceph_dirty_folio()
136 static void ceph_invalidate_folio(struct folio *folio, size_t offset, in ceph_invalidate_folio() argument
143 inode = folio->mapping->host; in ceph_invalidate_folio()
146 if (offset != 0 || length != folio_size(folio)) { in ceph_invalidate_folio()
148 inode, folio->index, offset, length); in ceph_invalidate_folio()
152 WARN_ON(!folio_test_locked(folio)); in ceph_invalidate_folio()
153 if (folio_test_private(folio)) { in ceph_invalidate_folio()
155 inode, folio->index); in ceph_invalidate_folio()
157 snapc = folio_detach_private(folio); in ceph_invalidate_folio()
162 folio_wait_fscache(folio); in ceph_invalidate_folio()
165 static bool ceph_release_folio(struct folio *folio, gfp_t gfp) in ceph_release_folio() argument
167 struct inode *inode = folio->mapping->host; in ceph_release_folio()
171 folio->index, folio_test_dirty(folio) ? "" : "not "); in ceph_release_folio()
173 if (folio_test_private(folio)) in ceph_release_folio()
176 if (folio_test_fscache(folio)) { in ceph_release_folio()
179 folio_wait_fscache(folio); in ceph_release_folio()
605 struct folio *folio = page_folio(page); in writepage_nounlock() local
643 dout("folio at %lu beyond eof %llu\n", folio->index, in writepage_nounlock()
645 folio_invalidate(folio, 0, folio_size(folio)); in writepage_nounlock()
972 struct folio *folio = page_folio(page); in ceph_writepages_start() local
975 folio->index, ceph_wbc.i_size); in ceph_writepages_start()
977 folio_pos(folio) >= i_size_read(inode)) && in ceph_writepages_start()
978 folio_clear_dirty_for_io(folio)) in ceph_writepages_start()
979 folio_invalidate(folio, 0, in ceph_writepages_start()
980 folio_size(folio)); in ceph_writepages_start()
981 folio_unlock(folio); in ceph_writepages_start()
1344 struct folio **foliop, void **_fsdata) in ceph_netfs_check_write_begin()
1379 struct folio *folio = NULL; in ceph_write_begin() local
1382 r = netfs_write_begin(&ci->netfs, file, inode->i_mapping, pos, len, &folio, NULL); in ceph_write_begin()
1386 folio_wait_fscache(folio); in ceph_write_begin()
1387 WARN_ON_ONCE(!folio_test_locked(folio)); in ceph_write_begin()
1388 *pagep = &folio->page; in ceph_write_begin()
1400 struct folio *folio = page_folio(subpage); in ceph_write_end() local
1405 inode, folio, (int)pos, (int)copied, (int)len); in ceph_write_end()
1407 if (!folio_test_uptodate(folio)) { in ceph_write_end()
1413 folio_mark_uptodate(folio); in ceph_write_end()
1420 folio_mark_dirty(folio); in ceph_write_end()
1423 folio_unlock(folio); in ceph_write_end()
1424 folio_put(folio); in ceph_write_end()
1704 struct folio *folio = NULL; in ceph_uninline_data() local
1732 folio = read_mapping_folio(inode->i_mapping, 0, file); in ceph_uninline_data()
1733 if (IS_ERR(folio)) { in ceph_uninline_data()
1734 err = PTR_ERR(folio); in ceph_uninline_data()
1738 folio_lock(folio); in ceph_uninline_data()
1741 if (len > folio_size(folio)) in ceph_uninline_data()
1742 len = folio_size(folio); in ceph_uninline_data()
1770 pages[0] = folio_page(folio, 0); in ceph_uninline_data()
1821 if (folio) { in ceph_uninline_data()
1822 folio_unlock(folio); in ceph_uninline_data()
1823 folio_put(folio); in ceph_uninline_data()