/fs/afs/ |
D | write.c | 25 bool afs_dirty_folio(struct address_space *mapping, struct folio *folio) in afs_dirty_folio() argument 27 return fscache_dirty_folio(mapping, folio, in afs_dirty_folio() 30 static void afs_folio_start_fscache(bool caching, struct folio *folio) in afs_folio_start_fscache() argument 33 folio_start_fscache(folio); in afs_folio_start_fscache() 36 static void afs_folio_start_fscache(bool caching, struct folio *folio) in afs_folio_start_fscache() argument 49 struct folio *folio; in afs_write_begin() local 63 ret = netfs_write_begin(&vnode->netfs, file, mapping, pos, len, &folio, fsdata); in afs_write_begin() 67 index = folio_index(folio); in afs_write_begin() 75 if (folio_test_private(folio)) { in afs_write_begin() 76 priv = (unsigned long)folio_get_private(folio); in afs_write_begin() [all …]
|
D | dir_edit.c | 110 static struct folio *afs_dir_get_folio(struct afs_vnode *vnode, pgoff_t index) in afs_dir_get_folio() 113 struct folio *folio; in afs_dir_get_folio() local 115 folio = __filemap_get_folio(mapping, index, in afs_dir_get_folio() 118 if (!folio) in afs_dir_get_folio() 120 else if (folio && !folio_test_private(folio)) in afs_dir_get_folio() 121 folio_attach_private(folio, (void *)1); in afs_dir_get_folio() 123 return folio; in afs_dir_get_folio() 211 struct folio *folio0, *folio; in afs_edit_dir_add() local 251 folio = afs_dir_get_folio(vnode, index); in afs_edit_dir_add() 252 if (!folio) in afs_edit_dir_add() [all …]
|
D | file.c | 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() [all …]
|
D | dir.c | 44 static bool afs_dir_release_folio(struct folio *folio, gfp_t gfp_flags); 45 static void afs_dir_invalidate_folio(struct folio *folio, size_t offset, 49 struct folio *folio) in afs_dir_dirty_folio() argument 113 struct folio *folio; in afs_dir_read_cleanup() local 122 xas_for_each(&xas, folio, last) { in afs_dir_read_cleanup() 123 if (xas_retry(&xas, folio)) in afs_dir_read_cleanup() 125 BUG_ON(xa_is_value(folio)); in afs_dir_read_cleanup() 126 ASSERTCMP(folio_file_mapping(folio), ==, mapping); in afs_dir_read_cleanup() 128 folio_put(folio); in afs_dir_read_cleanup() 137 static bool afs_dir_check_folio(struct afs_vnode *dvnode, struct folio *folio, in afs_dir_check_folio() argument [all …]
|
/fs/iomap/ |
D | buffered-io.c | 37 static inline struct iomap_page *to_iomap_page(struct folio *folio) in to_iomap_page() argument 39 if (folio_test_private(folio)) in to_iomap_page() 40 return folio_get_private(folio); in to_iomap_page() 47 iomap_page_create(struct inode *inode, struct folio *folio, unsigned int flags) in iomap_page_create() argument 49 struct iomap_page *iop = to_iomap_page(folio); in iomap_page_create() 50 unsigned int nr_blocks = i_blocks_per_folio(inode, folio); in iomap_page_create() 65 if (folio_test_uptodate(folio)) in iomap_page_create() 67 folio_attach_private(folio, iop); in iomap_page_create() 72 static void iomap_page_release(struct folio *folio) in iomap_page_release() argument 74 struct iomap_page *iop = folio_detach_private(folio); in iomap_page_release() [all …]
|
/fs/9p/ |
D | vfs_addr.c | 122 static bool v9fs_release_folio(struct folio *folio, gfp_t gfp) in v9fs_release_folio() argument 124 struct inode *inode = folio_inode(folio); in v9fs_release_folio() 126 if (folio_test_private(folio)) in v9fs_release_folio() 129 if (folio_test_fscache(folio)) { in v9fs_release_folio() 132 folio_wait_fscache(folio); in v9fs_release_folio() 139 static void v9fs_invalidate_folio(struct folio *folio, size_t offset, in v9fs_invalidate_folio() argument 142 folio_wait_fscache(folio); in v9fs_invalidate_folio() 159 static int v9fs_vfs_write_folio_locked(struct folio *folio) in v9fs_vfs_write_folio_locked() argument 161 struct inode *inode = folio_inode(folio); in v9fs_vfs_write_folio_locked() 164 loff_t start = folio_pos(folio); in v9fs_vfs_write_folio_locked() [all …]
|
/fs/netfs/ |
D | buffered_read.c | 19 struct folio *folio; in netfs_rreq_unlock_folios() local 47 xas_for_each(&xas, folio, last_page) { in netfs_rreq_unlock_folios() 52 if (xas_retry(&xas, folio)) in netfs_rreq_unlock_folios() 55 pg_end = folio_pos(folio) + folio_size(folio) - 1; in netfs_rreq_unlock_folios() 66 folio_start_fscache(folio); in netfs_rreq_unlock_folios() 88 flush_dcache_folio(folio); in netfs_rreq_unlock_folios() 89 folio_mark_uptodate(folio); in netfs_rreq_unlock_folios() 93 if (folio_index(folio) == rreq->no_unlock_folio && in netfs_rreq_unlock_folios() 97 folio_unlock(folio); in netfs_rreq_unlock_folios() 224 int netfs_read_folio(struct file *file, struct folio *folio) in netfs_read_folio() argument [all …]
|
/fs/ |
D | mpage.c | 79 static void map_buffer_to_folio(struct folio *folio, struct buffer_head *bh, in map_buffer_to_folio() argument 82 struct inode *inode = folio->mapping->host; in map_buffer_to_folio() 86 head = folio_buffers(folio); in map_buffer_to_folio() 94 folio_mark_uptodate(folio); in map_buffer_to_folio() 97 create_empty_buffers(&folio->page, i_blocksize(inode), 0); in map_buffer_to_folio() 98 head = folio_buffers(folio); in map_buffer_to_folio() 116 struct folio *folio; member 136 struct folio *folio = args->folio; in do_mpage_readpage() local 137 struct inode *inode = folio->mapping->host; in do_mpage_readpage() 154 gfp_t gfp = mapping_gfp_constraint(folio->mapping, GFP_KERNEL); in do_mpage_readpage() [all …]
|
D | buffer.c | 87 void buffer_check_dirty_writeback(struct folio *folio, in buffer_check_dirty_writeback() argument 94 BUG_ON(!folio_test_locked(folio)); in buffer_check_dirty_writeback() 96 head = folio_buffers(folio); in buffer_check_dirty_writeback() 100 if (folio_test_writeback(folio)) in buffer_check_dirty_writeback() 659 bool block_dirty_folio(struct address_space *mapping, struct folio *folio) in block_dirty_folio() argument 665 head = folio_buffers(folio); in block_dirty_folio() 678 folio_memcg_lock(folio); in block_dirty_folio() 679 newly_dirty = !folio_test_set_dirty(folio); in block_dirty_folio() 683 __folio_mark_dirty(folio, mapping, 1); in block_dirty_folio() 685 folio_memcg_unlock(folio); in block_dirty_folio() [all …]
|
/fs/orangefs/ |
D | inode.c | 246 static int orangefs_launder_folio(struct folio *); 291 static int orangefs_read_folio(struct file *file, struct folio *folio) in orangefs_read_folio() argument 293 struct inode *inode = folio->mapping->host; in orangefs_read_folio() 299 if (folio_test_dirty(folio)) in orangefs_read_folio() 300 orangefs_launder_folio(folio); in orangefs_read_folio() 302 off = folio_pos(folio); in orangefs_read_folio() 303 bv.bv_page = &folio->page; in orangefs_read_folio() 304 bv.bv_len = folio_size(folio); in orangefs_read_folio() 306 iov_iter_bvec(&iter, ITER_DEST, &bv, 1, folio_size(folio)); in orangefs_read_folio() 309 folio_size(folio), inode->i_size, NULL, NULL, file); in orangefs_read_folio() [all …]
|
/fs/freevxfs/ |
D | vxfs_immed.c | 31 static int vxfs_immed_read_folio(struct file *fp, struct folio *folio) in vxfs_immed_read_folio() argument 33 struct vxfs_inode_info *vip = VXFS_INO(folio->mapping->host); in vxfs_immed_read_folio() 34 void *src = vip->vii_immed.vi_immed + folio_pos(folio); in vxfs_immed_read_folio() 37 for (i = 0; i < folio_nr_pages(folio); i++) { in vxfs_immed_read_folio() 38 memcpy_to_page(folio_page(folio, i), 0, src, PAGE_SIZE); in vxfs_immed_read_folio() 42 folio_mark_uptodate(folio); in vxfs_immed_read_folio() 43 folio_unlock(folio); in vxfs_immed_read_folio()
|
D | vxfs_subr.c | 17 static int vxfs_read_folio(struct file *, struct folio *); 128 static int vxfs_read_folio(struct file *file, struct folio *folio) in vxfs_read_folio() argument 130 return block_read_full_folio(folio, vxfs_getblk); in vxfs_read_folio()
|
/fs/coda/ |
D | symlink.c | 23 static int coda_symlink_filler(struct file *file, struct folio *folio) in coda_symlink_filler() argument 25 struct inode *inode = folio->mapping->host; in coda_symlink_filler() 29 char *p = folio_address(folio); in coda_symlink_filler() 36 folio_mark_uptodate(folio); in coda_symlink_filler() 37 folio_unlock(folio); in coda_symlink_filler() 41 folio_set_error(folio); in coda_symlink_filler() 42 folio_unlock(folio); in coda_symlink_filler()
|
/fs/nilfs2/ |
D | page.c | 308 struct folio *folio = fbatch.folios[i], *dfolio; in nilfs_copy_back_pages() local 309 pgoff_t index = folio->index; in nilfs_copy_back_pages() 311 folio_lock(folio); in nilfs_copy_back_pages() 316 nilfs_copy_page(&dfolio->page, &folio->page, 0); in nilfs_copy_back_pages() 321 struct folio *f; in nilfs_copy_back_pages() 326 WARN_ON(folio != f); in nilfs_copy_back_pages() 331 f = __xa_store(&dmap->i_pages, index, folio, GFP_NOFS); in nilfs_copy_back_pages() 334 folio->mapping = NULL; in nilfs_copy_back_pages() 335 folio_put(folio); in nilfs_copy_back_pages() 337 folio->mapping = dmap; in nilfs_copy_back_pages() [all …]
|
/fs/erofs/ |
D | fscache.c | 64 struct folio *folio; in erofs_fscache_rreq_unlock_folios() local 77 xas_for_each(&xas, folio, last_page) { in erofs_fscache_rreq_unlock_folios() 81 if (xas_retry(&xas, folio)) in erofs_fscache_rreq_unlock_folios() 84 pgpos = (folio_index(folio) - start_page) * PAGE_SIZE; in erofs_fscache_rreq_unlock_folios() 85 pgend = pgpos + folio_size(folio); in erofs_fscache_rreq_unlock_folios() 111 folio_mark_uptodate(folio); in erofs_fscache_rreq_unlock_folios() 113 folio_unlock(folio); in erofs_fscache_rreq_unlock_folios() 219 static int erofs_fscache_meta_read_folio(struct file *data, struct folio *folio) in erofs_fscache_meta_read_folio() argument 222 struct super_block *sb = folio_mapping(folio)->host->i_sb; in erofs_fscache_meta_read_folio() 226 .m_pa = folio_pos(folio), in erofs_fscache_meta_read_folio() [all …]
|
/fs/gfs2/ |
D | aops.c | 444 static int gfs2_read_folio(struct file *file, struct folio *folio) in gfs2_read_folio() argument 446 struct inode *inode = folio->mapping->host; in gfs2_read_folio() 452 (i_blocksize(inode) == PAGE_SIZE && !folio_buffers(folio))) { in gfs2_read_folio() 453 error = iomap_read_folio(folio, &gfs2_iomap_ops); in gfs2_read_folio() 455 error = stuffed_readpage(ip, &folio->page); in gfs2_read_folio() 456 folio_unlock(folio); in gfs2_read_folio() 458 error = mpage_read_folio(folio, gfs2_block_map); in gfs2_read_folio() 575 struct folio *folio) in jdata_dirty_folio() argument 578 folio_set_checked(folio); in jdata_dirty_folio() 579 return block_dirty_folio(mapping, folio); in jdata_dirty_folio() [all …]
|
/fs/nfs/ |
D | symlink.c | 29 static int nfs_symlink_filler(struct file *file, struct folio *folio) in nfs_symlink_filler() argument 31 struct inode *inode = folio->mapping->host; in nfs_symlink_filler() 34 error = NFS_PROTO(inode)->readlink(inode, &folio->page, 0, PAGE_SIZE); in nfs_symlink_filler() 37 folio_mark_uptodate(folio); in nfs_symlink_filler() 38 folio_unlock(folio); in nfs_symlink_filler() 42 folio_set_error(folio); in nfs_symlink_filler() 43 folio_unlock(folio); in nfs_symlink_filler()
|
D | fscache.h | 51 static inline bool nfs_fscache_release_folio(struct folio *folio, gfp_t gfp) in nfs_fscache_release_folio() argument 53 if (folio_test_fscache(folio)) { in nfs_fscache_release_folio() 56 folio_wait_fscache(folio); in nfs_fscache_release_folio() 57 fscache_note_page_release(nfs_i_fscache(folio->mapping->host)); in nfs_fscache_release_folio() 58 nfs_inc_fscache_stats(folio->mapping->host, in nfs_fscache_release_folio() 132 static inline bool nfs_fscache_release_folio(struct folio *folio, gfp_t gfp) in nfs_fscache_release_folio() argument
|
D | file.c | 401 static void nfs_invalidate_folio(struct folio *folio, size_t offset, in nfs_invalidate_folio() argument 405 folio->index, offset, length); in nfs_invalidate_folio() 407 if (offset != 0 || length < folio_size(folio)) in nfs_invalidate_folio() 410 nfs_wb_folio_cancel(folio->mapping->host, folio); in nfs_invalidate_folio() 411 folio_wait_fscache(folio); in nfs_invalidate_folio() 420 static bool nfs_release_folio(struct folio *folio, gfp_t gfp) in nfs_release_folio() argument 422 dfprintk(PAGECACHE, "NFS: release_folio(%p)\n", folio); in nfs_release_folio() 425 if (folio_test_private(folio)) in nfs_release_folio() 427 return nfs_fscache_release_folio(folio, gfp); in nfs_release_folio() 430 static void nfs_check_dirty_writeback(struct folio *folio, in nfs_check_dirty_writeback() argument [all …]
|
/fs/ceph/ |
D | addr.c | 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 [all …]
|
D | cache.h | 53 struct folio *folio) in ceph_fscache_dirty_folio() argument 57 return fscache_dirty_folio(mapping, folio, ceph_fscache_cookie(ci)); in ceph_fscache_dirty_folio() 128 struct folio *folio) in ceph_fscache_dirty_folio() argument 130 return filemap_dirty_folio(mapping, folio); in ceph_fscache_dirty_folio()
|
/fs/ext4/ |
D | move_extent.c | 256 struct folio *folio[2] = {NULL, NULL}; in move_extent_per_page() local 317 folio[0] = page_folio(pagep[0]); in move_extent_per_page() 318 folio[1] = page_folio(pagep[1]); in move_extent_per_page() 320 VM_BUG_ON_FOLIO(folio_test_large(folio[0]), folio[0]); in move_extent_per_page() 321 VM_BUG_ON_FOLIO(folio_test_large(folio[1]), folio[1]); in move_extent_per_page() 322 VM_BUG_ON_FOLIO(folio_nr_pages(folio[0]) != folio_nr_pages(folio[1]), folio[1]); in move_extent_per_page() 342 if (!filemap_release_folio(folio[0], 0) || in move_extent_per_page() 343 !filemap_release_folio(folio[1], 0)) { in move_extent_per_page() 356 *err = mext_page_mkuptodate(&folio[0]->page, from, from + replaced_size); in move_extent_per_page() 362 if (!filemap_release_folio(folio[0], 0) || in move_extent_per_page() [all …]
|
/fs/jffs2/ |
D | file.c | 30 static int jffs2_read_folio(struct file *filp, struct folio *folio); 113 int __jffs2_read_folio(struct file *file, struct folio *folio) in __jffs2_read_folio() argument 115 int ret = jffs2_do_readpage_nolock(folio->mapping->host, &folio->page); in __jffs2_read_folio() 116 folio_unlock(folio); in __jffs2_read_folio() 120 static int jffs2_read_folio(struct file *file, struct folio *folio) in jffs2_read_folio() argument 122 struct jffs2_inode_info *f = JFFS2_INODE_INFO(folio->mapping->host); in jffs2_read_folio() 126 ret = __jffs2_read_folio(file, folio); in jffs2_read_folio()
|
/fs/ubifs/ |
D | file.c | 892 static int ubifs_read_folio(struct file *file, struct folio *folio) in ubifs_read_folio() argument 894 struct page *page = &folio->page; in ubifs_read_folio() 899 folio_unlock(folio); in ubifs_read_folio() 1297 static void ubifs_invalidate_folio(struct folio *folio, size_t offset, in ubifs_invalidate_folio() argument 1300 struct inode *inode = folio->mapping->host; in ubifs_invalidate_folio() 1303 ubifs_assert(c, folio_test_private(folio)); in ubifs_invalidate_folio() 1304 if (offset || length < folio_size(folio)) in ubifs_invalidate_folio() 1308 if (folio_test_checked(folio)) in ubifs_invalidate_folio() 1314 folio_detach_private(folio); in ubifs_invalidate_folio() 1315 folio_clear_checked(folio); in ubifs_invalidate_folio() [all …]
|
/fs/xfs/ |
D | xfs_aops.c | 455 struct folio *folio, in xfs_discard_folio() argument 458 struct inode *inode = folio->mapping->host; in xfs_discard_folio() 461 size_t offset = offset_in_folio(folio, pos); in xfs_discard_folio() 471 folio, ip->i_ino, pos); in xfs_discard_folio() 474 i_blocks_per_folio(inode, folio) - pageoff_fsb); in xfs_discard_folio() 541 struct folio *folio) in xfs_vm_read_folio() argument 543 return iomap_read_folio(folio, &xfs_read_iomap_ops); in xfs_vm_read_folio()
|