Lines Matching refs:folio
22 static int afs_symlink_read_folio(struct file *file, struct folio *folio);
23 static void afs_invalidate_folio(struct folio *folio, size_t offset,
25 static bool afs_release_folio(struct folio *folio, gfp_t gfp_flags);
335 static int afs_symlink_read_folio(struct file *file, struct folio *folio) in afs_symlink_read_folio() argument
337 struct afs_vnode *vnode = AFS_FS_I(folio->mapping->host); in afs_symlink_read_folio()
345 fsreq->pos = folio_pos(folio); in afs_symlink_read_folio()
346 fsreq->len = folio_size(folio); in afs_symlink_read_folio()
349 iov_iter_xarray(&fsreq->def_iter, ITER_DEST, &folio->mapping->i_pages, in afs_symlink_read_folio()
354 folio_mark_uptodate(folio); in afs_symlink_read_folio()
355 folio_unlock(folio); in afs_symlink_read_folio()
378 struct folio **foliop, void **_fsdata) in afs_check_write_begin()
408 static void afs_invalidate_dirty(struct folio *folio, size_t offset, in afs_invalidate_dirty() argument
411 struct afs_vnode *vnode = AFS_FS_I(folio_inode(folio)); in afs_invalidate_dirty()
415 priv = (unsigned long)folio_get_private(folio); in afs_invalidate_dirty()
418 if (offset == 0 && length == folio_size(folio)) in afs_invalidate_dirty()
429 f = afs_folio_dirty_from(folio, priv); in afs_invalidate_dirty()
430 t = afs_folio_dirty_to(folio, priv); in afs_invalidate_dirty()
448 priv = afs_folio_dirty(folio, f, t); in afs_invalidate_dirty()
449 folio_change_private(folio, (void *)priv); in afs_invalidate_dirty()
450 trace_afs_folio_dirty(vnode, tracepoint_string("trunc"), folio); in afs_invalidate_dirty()
454 trace_afs_folio_dirty(vnode, tracepoint_string("undirty"), folio); in afs_invalidate_dirty()
455 folio_clear_dirty_for_io(folio); in afs_invalidate_dirty()
457 trace_afs_folio_dirty(vnode, tracepoint_string("inval"), folio); in afs_invalidate_dirty()
458 folio_detach_private(folio); in afs_invalidate_dirty()
466 static void afs_invalidate_folio(struct folio *folio, size_t offset, in afs_invalidate_folio() argument
469 _enter("{%lu},%zu,%zu", folio->index, offset, length); in afs_invalidate_folio()
471 BUG_ON(!folio_test_locked(folio)); in afs_invalidate_folio()
473 if (folio_get_private(folio)) in afs_invalidate_folio()
474 afs_invalidate_dirty(folio, offset, length); in afs_invalidate_folio()
476 folio_wait_fscache(folio); in afs_invalidate_folio()
484 static bool afs_release_folio(struct folio *folio, gfp_t gfp) in afs_release_folio() argument
486 struct afs_vnode *vnode = AFS_FS_I(folio_inode(folio)); in afs_release_folio()
489 vnode->fid.vid, vnode->fid.vnode, folio_index(folio), folio->flags, in afs_release_folio()
495 if (folio_test_fscache(folio)) { in afs_release_folio()
498 folio_wait_fscache(folio); in afs_release_folio()
503 if (folio_test_private(folio)) { in afs_release_folio()
504 trace_afs_folio_dirty(vnode, tracepoint_string("rel"), folio); in afs_release_folio()
505 folio_detach_private(folio); in afs_release_folio()