Lines Matching refs:page
57 STATIC void xfs_count_page_state(struct page *, int *, int *, int *);
58 STATIC void xfs_convert_page(struct inode *, struct page *,
66 struct page *page, in xfs_page_trace() argument
73 loff_t offset = page->index << PAGE_CACHE_SHIFT; in xfs_page_trace()
76 if (page_has_buffers(page)) in xfs_page_trace()
77 xfs_count_page_state(page, &delalloc, &unmapped, &unwritten); in xfs_page_trace()
88 (void *)page, in xfs_page_trace()
103 #define xfs_page_trace(tag, inode, page, mask) argument
168 struct page *page, in xfs_offset_to_map() argument
176 full_offset = page->index; /* NB: using 64bit number */ in xfs_offset_to_map()
189 struct page *page, in xfs_map_at_offset() argument
203 delta = page->index; in xfs_map_at_offset()
229 STATIC struct page *
239 struct page *page; in xfs_probe_unwritten_page() local
241 page = find_trylock_page(mapping, index); in xfs_probe_unwritten_page()
242 if (!page) in xfs_probe_unwritten_page()
245 if (page->mapping && page_has_buffers(page)) { in xfs_probe_unwritten_page()
250 bh = head = page_buffers(page); in xfs_probe_unwritten_page()
254 if (!xfs_offset_to_map(page, iomapp, p_offset)) in xfs_probe_unwritten_page()
258 xfs_map_at_offset(page, bh, p_offset, bbits, iomapp); in xfs_probe_unwritten_page()
266 return page; in xfs_probe_unwritten_page()
269 unlock_page(page); in xfs_probe_unwritten_page()
283 struct page *page; in xfs_probe_unmapped_page() local
286 page = find_trylock_page(mapping, index); in xfs_probe_unmapped_page()
287 if (!page) in xfs_probe_unmapped_page()
290 if (page->mapping && PageDirty(page)) { in xfs_probe_unmapped_page()
291 if (page_has_buffers(page)) { in xfs_probe_unmapped_page()
294 bh = head = page_buffers(page); in xfs_probe_unmapped_page()
306 unlock_page(page); in xfs_probe_unmapped_page()
313 struct page *startpage, in xfs_probe_unmapped_cluster()
356 STATIC struct page *
361 struct page *page; in xfs_probe_delalloc_page() local
363 page = find_trylock_page(inode->i_mapping, index); in xfs_probe_delalloc_page()
364 if (!page) in xfs_probe_delalloc_page()
367 if (page->mapping && page_has_buffers(page)) { in xfs_probe_delalloc_page()
371 bh = head = page_buffers(page); in xfs_probe_delalloc_page()
382 return page; in xfs_probe_delalloc_page()
385 unlock_page(page); in xfs_probe_delalloc_page()
392 struct page *start_page, in xfs_map_unwritten()
458 struct page *page; in xfs_map_unwritten() local
464 page = xfs_probe_unwritten_page(mapping, in xfs_map_unwritten()
467 if (!page) in xfs_map_unwritten()
471 xfs_convert_page(inode, page, iomapp, pb, in xfs_map_unwritten()
482 page = xfs_probe_unwritten_page(mapping, in xfs_map_unwritten()
485 if (page) { in xfs_map_unwritten()
488 xfs_convert_page(inode, page, iomapp, pb, in xfs_map_unwritten()
517 struct page *page, in xfs_submit_page() argument
539 unlock_page(page); in xfs_submit_page()
552 struct page *page, in xfs_convert_page() argument
566 if (page->index < end_index) { in xfs_convert_page()
571 bh = head = page_buffers(page); in xfs_convert_page()
576 if (!(PageUptodate(page) || buffer_uptodate(bh))) in xfs_convert_page()
586 tmp = xfs_offset_to_map(page, mp, offset); in xfs_convert_page()
598 xfs_map_unwritten(inode, page, head, bh, in xfs_convert_page()
601 xfs_map_at_offset(page, bh, offset, bbits, tmp); in xfs_convert_page()
617 xfs_submit_page(page, bh_arr, index); in xfs_convert_page()
619 unlock_page(page); in xfs_convert_page()
636 struct page *page; in xfs_cluster_write() local
639 page = xfs_probe_delalloc_page(inode, tindex); in xfs_cluster_write()
640 if (!page) in xfs_cluster_write()
642 xfs_convert_page(inode, page, iomapp, NULL, startio, all_bh); in xfs_cluster_write()
668 struct page *page, in xfs_page_state_convert() argument
688 if (page->index >= end_index) { in xfs_page_state_convert()
689 if ((page->index >= end_index + 1) || in xfs_page_state_convert()
696 offset = (loff_t)page->index << PAGE_CACHE_SHIFT; in xfs_page_state_convert()
700 bh = head = page_buffers(page); in xfs_page_state_convert()
709 if (!(PageUptodate(page) || buffer_uptodate(bh)) && !startio) in xfs_page_state_convert()
713 iomp = xfs_offset_to_map(page, &iomap, p_offset); in xfs_page_state_convert()
729 iomp = xfs_offset_to_map(page, &iomap, in xfs_page_state_convert()
734 err = xfs_map_unwritten(inode, page, in xfs_page_state_convert()
760 iomp = xfs_offset_to_map(page, &iomap, in xfs_page_state_convert()
764 xfs_map_at_offset(page, bh, p_offset, in xfs_page_state_convert()
774 } else if ((buffer_uptodate(bh) || PageUptodate(page)) && in xfs_page_state_convert()
787 inode, page, bh, head); in xfs_page_state_convert()
794 iomp = xfs_offset_to_map(page, &iomap, in xfs_page_state_convert()
798 xfs_map_at_offset(page, in xfs_page_state_convert()
821 SetPageUptodate(page); in xfs_page_state_convert()
824 xfs_submit_page(page, bh_arr, cnt); in xfs_page_state_convert()
831 xfs_cluster_write(inode, page->index + 1, iomp, in xfs_page_state_convert()
849 block_flushpage(page, 0); in xfs_page_state_convert()
851 ClearPageUptodate(page); in xfs_page_state_convert()
971 struct page *page) in linvfs_readpage() argument
973 return block_read_full_page(page, linvfs_get_block); in linvfs_readpage()
978 struct page *page, in xfs_count_page_state() argument
987 bh = head = page_buffers(page); in xfs_count_page_state()
1023 struct page *page) in linvfs_writepage() argument
1028 struct inode *inode = page->mapping->host; in linvfs_writepage()
1030 xfs_page_trace(XFS_WRITEPAGE_ENTER, inode, page, 0); in linvfs_writepage()
1040 if (!page_has_buffers(page)) { in linvfs_writepage()
1044 xfs_count_page_state(page, &delalloc, &unmapped, &unwritten); in linvfs_writepage()
1045 if (!PageUptodate(page)) in linvfs_writepage()
1064 if (!page_has_buffers(page)) in linvfs_writepage()
1065 create_empty_buffers(page, inode->i_dev, 1 << inode->i_blkbits); in linvfs_writepage()
1073 error = xfs_page_state_convert(inode, page, 1, unmapped); in linvfs_writepage()
1080 unlock_page(page); in linvfs_writepage()
1087 SetPageDirty(page); in linvfs_writepage()
1088 unlock_page(page); in linvfs_writepage()
1113 struct page *page, in linvfs_release_page() argument
1116 struct inode *inode = page->mapping->host; in linvfs_release_page()
1119 xfs_page_trace(XFS_RELEASEPAGE_ENTER, inode, page, gfp_mask); in linvfs_release_page()
1121 xfs_count_page_state(page, &delalloc, &unmapped, &unwritten); in linvfs_release_page()
1140 dirty = xfs_page_state_convert(inode, page, 0, 0); in linvfs_release_page()
1147 struct page *page, in linvfs_prepare_write() argument
1151 return block_prepare_write(page, from, to, linvfs_get_block); in linvfs_prepare_write()
1165 struct page **maplist; in linvfs_direct_IO()
1224 struct page *page; in linvfs_direct_IO() local
1231 page = maplist[pg_index]; in linvfs_direct_IO()
1233 memset(kmap(page) + page_offset, 0, pg_len); in linvfs_direct_IO()
1234 flush_dcache_page(page); in linvfs_direct_IO()
1235 kunmap(page); in linvfs_direct_IO()