Lines Matching refs:page
81 struct page *page, in xfs_count_page_state() argument
90 bh = head = page_buffers(page); in xfs_count_page_state()
106 struct page *page, in xfs_page_trace() argument
111 loff_t offset = page_offset(page); in xfs_page_trace()
114 if (page_has_buffers(page)) in xfs_page_trace()
115 xfs_count_page_state(page, &delalloc, &unmapped, &unwritten); in xfs_page_trace()
125 (void *)page, in xfs_page_trace()
140 #define xfs_page_trace(tag, inode, page, pgoff) argument
448 struct page *page, in xfs_start_page_writeback() argument
452 ASSERT(PageLocked(page)); in xfs_start_page_writeback()
453 ASSERT(!PageWriteback(page)); in xfs_start_page_writeback()
455 clear_page_dirty_for_io(page); in xfs_start_page_writeback()
456 set_page_writeback(page); in xfs_start_page_writeback()
457 unlock_page(page); in xfs_start_page_writeback()
460 end_page_writeback(page); in xfs_start_page_writeback()
637 struct page *page, in xfs_probe_page() argument
643 if (PageWriteback(page)) in xfs_probe_page()
646 if (page->mapping && PageDirty(page)) { in xfs_probe_page()
647 if (page_has_buffers(page)) { in xfs_probe_page()
650 bh = head = page_buffers(page); in xfs_probe_page()
670 struct page *startpage, in xfs_probe_cluster()
702 struct page *page = pvec.pages[i]; in xfs_probe_cluster() local
715 if (page->index == tindex && trylock_page(page)) { in xfs_probe_cluster()
716 pg_len = xfs_probe_page(page, pg_offset, mapped); in xfs_probe_cluster()
717 unlock_page(page); in xfs_probe_cluster()
742 struct page *page, in xfs_is_delayed_page() argument
745 if (PageWriteback(page)) in xfs_is_delayed_page()
748 if (page->mapping && page_has_buffers(page)) { in xfs_is_delayed_page()
752 bh = head = page_buffers(page); in xfs_is_delayed_page()
780 struct page *page, in xfs_convert_page() argument
795 xfs_off_t offset = page_offset(page); in xfs_convert_page()
797 if (page->index != tindex) in xfs_convert_page()
799 if (!trylock_page(page)) in xfs_convert_page()
801 if (PageWriteback(page)) in xfs_convert_page()
803 if (page->mapping != inode->i_mapping) in xfs_convert_page()
805 if (!xfs_is_delayed_page(page, (*ioendp)->io_type)) in xfs_convert_page()
822 (xfs_off_t)(page->index + 1) << PAGE_CACHE_SHIFT, in xfs_convert_page()
831 bh = head = page_buffers(page); in xfs_convert_page()
837 if (!(PageUptodate(page) || buffer_uptodate(bh))) { in xfs_convert_page()
882 SetPageUptodate(page); in xfs_convert_page()
897 xfs_start_page_writeback(page, !page_dirty, count); in xfs_convert_page()
902 unlock_page(page); in xfs_convert_page()
966 struct page *page, in xfs_page_state_convert() argument
994 if (page->index >= end_index) { in xfs_page_state_convert()
995 if ((page->index >= end_index + 1) || in xfs_page_state_convert()
998 unlock_page(page); in xfs_page_state_convert()
1017 (xfs_off_t)(page->index + 1) << PAGE_CACHE_SHIFT, offset); in xfs_page_state_convert()
1024 bh = head = page_buffers(page); in xfs_page_state_convert()
1025 offset = page_offset(page); in xfs_page_state_convert()
1036 if (!(PageUptodate(page) || buffer_uptodate(bh)) && !startio) { in xfs_page_state_convert()
1059 ((buffer_uptodate(bh) || PageUptodate(page)) && in xfs_page_state_convert()
1092 page, bh, head, 0); in xfs_page_state_convert()
1126 size = xfs_probe_cluster(inode, page, bh, in xfs_page_state_convert()
1155 } else if ((buffer_uptodate(bh) || PageUptodate(page)) && in xfs_page_state_convert()
1166 SetPageUptodate(page); in xfs_page_state_convert()
1169 xfs_start_page_writeback(page, 1, count); in xfs_page_state_convert()
1175 xfs_cluster_write(inode, page->index + 1, &iomap, &ioend, in xfs_page_state_convert()
1195 block_invalidatepage(page, 0); in xfs_page_state_convert()
1196 ClearPageUptodate(page); in xfs_page_state_convert()
1223 struct page *page, in xfs_vm_writepage() argument
1229 struct inode *inode = page->mapping->host; in xfs_vm_writepage()
1231 xfs_page_trace(XFS_WRITEPAGE_ENTER, inode, page, 0); in xfs_vm_writepage()
1241 if (!page_has_buffers(page)) { in xfs_vm_writepage()
1245 xfs_count_page_state(page, &delalloc, &unmapped, &unwritten); in xfs_vm_writepage()
1246 if (!PageUptodate(page)) in xfs_vm_writepage()
1264 if (!page_has_buffers(page)) in xfs_vm_writepage()
1265 create_empty_buffers(page, 1 << inode->i_blkbits, 0); in xfs_vm_writepage()
1271 error = xfs_page_state_convert(inode, page, wbc, 1, unmapped); in xfs_vm_writepage()
1280 redirty_page_for_writepage(wbc, page); in xfs_vm_writepage()
1281 unlock_page(page); in xfs_vm_writepage()
1284 unlock_page(page); in xfs_vm_writepage()
1318 struct page *page, in xfs_vm_releasepage() argument
1321 struct inode *inode = page->mapping->host; in xfs_vm_releasepage()
1328 xfs_page_trace(XFS_RELEASEPAGE_ENTER, inode, page, 0); in xfs_vm_releasepage()
1330 if (!page_has_buffers(page)) in xfs_vm_releasepage()
1333 xfs_count_page_state(page, &delalloc, &unmapped, &unwritten); in xfs_vm_releasepage()
1352 dirty = xfs_page_state_convert(inode, page, &wbc, 0, 0); in xfs_vm_releasepage()
1358 return try_to_free_buffers(page); in xfs_vm_releasepage()
1562 struct page **pagep, in xfs_vm_write_begin()
1588 struct page *page) in xfs_vm_readpage() argument
1590 return mpage_readpage(page, xfs_get_blocks); in xfs_vm_readpage()
1605 struct page *page, in xfs_vm_invalidatepage() argument
1609 page->mapping->host, page, offset); in xfs_vm_invalidatepage()
1610 block_invalidatepage(page, offset); in xfs_vm_invalidatepage()