Lines Matching refs:folio

241 	struct folio *folio;  in netfs_rreq_unmark_after_write()  local
250 xas_for_each(&xas, folio, (subreq->start + subreq->len - 1) / PAGE_SIZE) { in netfs_rreq_unmark_after_write()
254 if (have_unlocked && folio_index(folio) <= unlocked) in netfs_rreq_unmark_after_write()
256 unlocked = folio_index(folio); in netfs_rreq_unmark_after_write()
257 folio_end_fscache(folio); in netfs_rreq_unmark_after_write()
371 struct folio *folio; in netfs_rreq_unlock() local
400 xas_for_each(&xas, folio, last_page) { in netfs_rreq_unlock()
401 unsigned int pgpos = (folio_index(folio) - start_page) * PAGE_SIZE; in netfs_rreq_unlock()
402 unsigned int pgend = pgpos + folio_size(folio); in netfs_rreq_unlock()
411 folio_start_fscache(folio); in netfs_rreq_unlock()
430 flush_dcache_folio(folio); in netfs_rreq_unlock()
431 folio_mark_uptodate(folio); in netfs_rreq_unlock()
435 if (folio_index(folio) == rreq->no_unlock_folio && in netfs_rreq_unlock()
439 folio_unlock(folio); in netfs_rreq_unlock()
945 struct folio *folio, in netfs_readpage() argument
953 _enter("%lx", folio_index(folio)); in netfs_readpage()
958 ops->cleanup(folio_file_mapping(folio), netfs_priv); in netfs_readpage()
959 folio_unlock(folio); in netfs_readpage()
962 rreq->mapping = folio_file_mapping(folio); in netfs_readpage()
963 rreq->start = folio_file_pos(folio); in netfs_readpage()
964 rreq->len = folio_size(folio); in netfs_readpage()
969 folio_unlock(folio); in netfs_readpage()
1020 static bool netfs_skip_folio_read(struct folio *folio, loff_t pos, size_t len) in netfs_skip_folio_read() argument
1022 struct inode *inode = folio_inode(folio); in netfs_skip_folio_read()
1024 size_t offset = offset_in_folio(folio, pos); in netfs_skip_folio_read()
1027 if (offset == 0 && len >= folio_size(folio)) in netfs_skip_folio_read()
1040 zero_user_segments(&folio->page, 0, offset, offset + len, folio_size(folio)); in netfs_skip_folio_read()
1077 struct folio **_folio, void **_fsdata, in netfs_write_begin()
1082 struct folio *folio; in netfs_write_begin() local
1094 folio = __filemap_get_folio(mapping, index, fgp_flags, in netfs_write_begin()
1096 if (!folio) in netfs_write_begin()
1101 ret = ops->check_write_begin(file, pos, len, folio, _fsdata); in netfs_write_begin()
1110 if (folio_test_uptodate(folio)) in netfs_write_begin()
1118 netfs_skip_folio_read(folio, pos, len)) { in netfs_write_begin()
1127 rreq->mapping = folio_file_mapping(folio); in netfs_write_begin()
1128 rreq->start = folio_file_pos(folio); in netfs_write_begin()
1129 rreq->len = folio_size(folio); in netfs_write_begin()
1130 rreq->no_unlock_folio = folio_index(folio); in netfs_write_begin()
1146 ractl._nr_pages = folio_nr_pages(folio); in netfs_write_begin()
1151 folio_get(folio); in netfs_write_begin()
1184 ret = folio_wait_fscache_killable(folio); in netfs_write_begin()
1190 *_folio = folio; in netfs_write_begin()
1197 folio_unlock(folio); in netfs_write_begin()
1198 folio_put(folio); in netfs_write_begin()