• Home
  • Raw
  • Download

Lines Matching refs:page

49 	struct page *page;  in ntfs_end_buffer_async_read()  local
54 page = bh->b_page; in ntfs_end_buffer_async_read()
55 vi = page->mapping->host; in ntfs_end_buffer_async_read()
64 file_ofs = ((s64)page->index << PAGE_SHIFT) + in ntfs_end_buffer_async_read()
82 kaddr = kmap_atomic(page); in ntfs_end_buffer_async_read()
85 flush_dcache_page(page); in ntfs_end_buffer_async_read()
90 SetPageError(page); in ntfs_end_buffer_async_read()
94 first = page_buffers(page); in ntfs_end_buffer_async_read()
122 if (likely(page_uptodate && !PageError(page))) in ntfs_end_buffer_async_read()
123 SetPageUptodate(page); in ntfs_end_buffer_async_read()
133 kaddr = kmap_atomic(page); in ntfs_end_buffer_async_read()
138 flush_dcache_page(page); in ntfs_end_buffer_async_read()
139 if (likely(page_uptodate && !PageError(page))) in ntfs_end_buffer_async_read()
140 SetPageUptodate(page); in ntfs_end_buffer_async_read()
142 unlock_page(page); in ntfs_end_buffer_async_read()
167 static int ntfs_read_block(struct page *page) in ntfs_read_block() argument
184 vi = page->mapping->host; in ntfs_read_block()
194 if (!page_has_buffers(page)) { in ntfs_read_block()
195 create_empty_buffers(page, blocksize, 0); in ntfs_read_block()
196 if (unlikely(!page_has_buffers(page))) { in ntfs_read_block()
197 unlock_page(page); in ntfs_read_block()
201 bh = head = page_buffers(page); in ntfs_read_block()
215 iblock = (s64)page->index << (PAGE_SHIFT - blocksize_bits); in ntfs_read_block()
305 SetPageError(page); in ntfs_read_block()
324 zero_user(page, i * blocksize, blocksize); in ntfs_read_block()
355 if (likely(!PageError(page))) in ntfs_read_block()
356 SetPageUptodate(page); in ntfs_read_block()
359 unlock_page(page); in ntfs_read_block()
381 static int ntfs_readpage(struct file *file, struct page *page) in ntfs_readpage() argument
394 BUG_ON(!PageLocked(page)); in ntfs_readpage()
395 vi = page->mapping->host; in ntfs_readpage()
398 if (unlikely(page->index >= (i_size + PAGE_SIZE - 1) >> in ntfs_readpage()
400 zero_user(page, 0, PAGE_SIZE); in ntfs_readpage()
408 if (PageUptodate(page)) { in ntfs_readpage()
409 unlock_page(page); in ntfs_readpage()
432 return ntfs_read_compressed_block(page); in ntfs_readpage()
438 return ntfs_read_block(page); in ntfs_readpage()
448 if (unlikely(page->index > 0)) { in ntfs_readpage()
449 zero_user(page, 0, PAGE_SIZE); in ntfs_readpage()
489 addr = kmap_atomic(page); in ntfs_readpage()
496 flush_dcache_page(page); in ntfs_readpage()
503 SetPageUptodate(page); in ntfs_readpage()
505 unlock_page(page); in ntfs_readpage()
533 static int ntfs_write_block(struct page *page, struct writeback_control *wbc) in ntfs_write_block() argument
551 vi = page->mapping->host; in ntfs_write_block()
556 "0x%lx.", ni->mft_no, ni->type, page->index); in ntfs_write_block()
562 if (!page_has_buffers(page)) { in ntfs_write_block()
563 BUG_ON(!PageUptodate(page)); in ntfs_write_block()
564 create_empty_buffers(page, blocksize, in ntfs_write_block()
566 if (unlikely(!page_has_buffers(page))) { in ntfs_write_block()
574 redirty_page_for_writepage(wbc, page); in ntfs_write_block()
575 unlock_page(page); in ntfs_write_block()
579 bh = head = page_buffers(page); in ntfs_write_block()
585 block = (s64)page->index << (PAGE_SHIFT - blocksize_bits); in ntfs_write_block()
673 if (!PageUptodate(page)) { in ntfs_write_block()
731 kaddr = kmap_atomic(page); in ntfs_write_block()
778 zero_user(page, bh_offset(bh), blocksize); in ntfs_write_block()
805 if (unlikely(!PageUptodate(page))) { in ntfs_write_block()
815 SetPageUptodate(page); in ntfs_write_block()
849 redirty_page_for_writepage(wbc, page); in ntfs_write_block()
852 SetPageError(page); in ntfs_write_block()
855 BUG_ON(PageWriteback(page)); in ntfs_write_block()
856 set_page_writeback(page); /* Keeps try_to_free_buffers() away. */ in ntfs_write_block()
868 unlock_page(page); in ntfs_write_block()
872 end_page_writeback(page); in ntfs_write_block()
902 static int ntfs_write_mst_block(struct page *page, in ntfs_write_mst_block() argument
906 struct inode *vi = page->mapping->host; in ntfs_write_mst_block()
924 "0x%lx.", vi->i_ino, ni->type, page->index); in ntfs_write_mst_block()
946 bh = head = page_buffers(page); in ntfs_write_mst_block()
955 rec_block = block = (sector_t)page->index << in ntfs_write_mst_block()
1105 kaddr = kmap(page); in ntfs_write_mst_block()
1107 BUG_ON(!PageUptodate(page)); in ntfs_write_mst_block()
1108 ClearPageUptodate(page); in ntfs_write_mst_block()
1122 mft_no = (((s64)page->index << PAGE_SHIFT) + ofs) in ntfs_write_mst_block()
1161 ni->type, page->index, ofs); in ntfs_write_mst_block()
1177 flush_dcache_page(page); in ntfs_write_mst_block()
1209 page->index, bh_offset(tbh)); in ntfs_write_mst_block()
1238 mft_no = (((s64)page->index << PAGE_SHIFT) + ofs) in ntfs_write_mst_block()
1258 flush_dcache_page(page); in ntfs_write_mst_block()
1281 SetPageUptodate(page); in ntfs_write_mst_block()
1282 kunmap(page); in ntfs_write_mst_block()
1290 SetPageError(page); in ntfs_write_mst_block()
1296 "record 0x%lx.", page->index << in ntfs_write_mst_block()
1298 redirty_page_for_writepage(wbc, page); in ntfs_write_mst_block()
1299 unlock_page(page); in ntfs_write_mst_block()
1306 BUG_ON(PageWriteback(page)); in ntfs_write_mst_block()
1307 set_page_writeback(page); in ntfs_write_mst_block()
1308 unlock_page(page); in ntfs_write_mst_block()
1309 end_page_writeback(page); in ntfs_write_mst_block()
1339 static int ntfs_writepage(struct page *page, struct writeback_control *wbc) in ntfs_writepage() argument
1342 struct inode *vi = page->mapping->host; in ntfs_writepage()
1351 BUG_ON(!PageLocked(page)); in ntfs_writepage()
1354 if (unlikely(page->index >= (i_size + PAGE_SIZE - 1) >> in ntfs_writepage()
1360 block_invalidatepage(page, 0, PAGE_SIZE); in ntfs_writepage()
1361 unlock_page(page); in ntfs_writepage()
1376 unlock_page(page); in ntfs_writepage()
1387 unlock_page(page); in ntfs_writepage()
1394 unlock_page(page); in ntfs_writepage()
1403 if (page->index >= (i_size >> PAGE_SHIFT)) { in ntfs_writepage()
1406 zero_user_segment(page, ofs, PAGE_SIZE); in ntfs_writepage()
1410 return ntfs_write_mst_block(page, wbc); in ntfs_writepage()
1412 return ntfs_write_block(page, wbc); in ntfs_writepage()
1422 BUG_ON(page_has_buffers(page)); in ntfs_writepage()
1423 BUG_ON(!PageUptodate(page)); in ntfs_writepage()
1424 if (unlikely(page->index > 0)) { in ntfs_writepage()
1426 "Aborting write.", page->index); in ntfs_writepage()
1427 BUG_ON(PageWriteback(page)); in ntfs_writepage()
1428 set_page_writeback(page); in ntfs_writepage()
1429 unlock_page(page); in ntfs_writepage()
1430 end_page_writeback(page); in ntfs_writepage()
1466 BUG_ON(PageWriteback(page)); in ntfs_writepage()
1467 set_page_writeback(page); in ntfs_writepage()
1468 unlock_page(page); in ntfs_writepage()
1483 addr = kmap_atomic(page); in ntfs_writepage()
1491 flush_dcache_page(page); in ntfs_writepage()
1494 end_page_writeback(page); in ntfs_writepage()
1508 redirty_page_for_writepage(wbc, page); in ntfs_writepage()
1513 SetPageError(page); in ntfs_writepage()
1516 unlock_page(page); in ntfs_writepage()
1715 void mark_ntfs_record_dirty(struct page *page, const unsigned int ofs) { in mark_ntfs_record_dirty() argument
1716 struct address_space *mapping = page->mapping; in mark_ntfs_record_dirty()
1721 BUG_ON(!PageUptodate(page)); in mark_ntfs_record_dirty()
1725 if (unlikely(!page_has_buffers(page))) { in mark_ntfs_record_dirty()
1727 bh = head = alloc_page_buffers(page, bh_size, true); in mark_ntfs_record_dirty()
1729 if (likely(!page_has_buffers(page))) { in mark_ntfs_record_dirty()
1738 attach_page_buffers(page, head); in mark_ntfs_record_dirty()
1742 bh = head = page_buffers(page); in mark_ntfs_record_dirty()
1753 __set_page_dirty_nobuffers(page); in mark_ntfs_record_dirty()