Lines Matching refs:iop
25 struct iomap_page *iop = to_iomap_page(page); in iomap_page_create() local
28 if (iop || i_blocksize(inode) == PAGE_SIZE) in iomap_page_create()
29 return iop; in iomap_page_create()
31 iop = kmalloc(sizeof(*iop), GFP_NOFS | __GFP_NOFAIL); in iomap_page_create()
32 atomic_set(&iop->read_count, 0); in iomap_page_create()
33 atomic_set(&iop->write_count, 0); in iomap_page_create()
34 spin_lock_init(&iop->uptodate_lock); in iomap_page_create()
35 bitmap_zero(iop->uptodate, PAGE_SIZE / SECTOR_SIZE); in iomap_page_create()
37 bitmap_fill(iop->uptodate, nr_blocks); in iomap_page_create()
44 set_page_private(page, (unsigned long)iop); in iomap_page_create()
46 return iop; in iomap_page_create()
52 struct iomap_page *iop = to_iomap_page(page); in iomap_page_release() local
54 if (!iop) in iomap_page_release()
56 WARN_ON_ONCE(atomic_read(&iop->read_count)); in iomap_page_release()
57 WARN_ON_ONCE(atomic_read(&iop->write_count)); in iomap_page_release()
61 kfree(iop); in iomap_page_release()
68 iomap_adjust_read_range(struct inode *inode, struct iomap_page *iop, in iomap_adjust_read_range() argument
85 if (iop) { in iomap_adjust_read_range()
90 if (!test_bit(i, iop->uptodate)) in iomap_adjust_read_range()
100 if (test_bit(i, iop->uptodate)) { in iomap_adjust_read_range()
127 struct iomap_page *iop = to_iomap_page(page); in iomap_iop_set_range_uptodate() local
135 spin_lock_irqsave(&iop->uptodate_lock, flags); in iomap_iop_set_range_uptodate()
138 set_bit(i, iop->uptodate); in iomap_iop_set_range_uptodate()
139 else if (!test_bit(i, iop->uptodate)) in iomap_iop_set_range_uptodate()
145 spin_unlock_irqrestore(&iop->uptodate_lock, flags); in iomap_iop_set_range_uptodate()
161 iomap_read_finish(struct iomap_page *iop, struct page *page) in iomap_read_finish() argument
163 if (!iop || atomic_dec_and_test(&iop->read_count)) in iomap_read_finish()
171 struct iomap_page *iop = to_iomap_page(page); in iomap_read_page_end_io() local
180 iomap_read_finish(iop, page); in iomap_read_page_end_io()
229 struct iomap_page *iop = iomap_page_create(inode, page); in iomap_readpage_actor() local
242 iomap_adjust_read_range(inode, iop, &pos, length, &poff, &plen); in iomap_readpage_actor()
263 if (!same_page && iop) in iomap_readpage_actor()
264 atomic_inc(&iop->read_count); in iomap_readpage_actor()
273 if (iop) in iomap_readpage_actor()
274 atomic_inc(&iop->read_count); in iomap_readpage_actor()
449 struct iomap_page *iop = to_iomap_page(page); in iomap_is_partially_uptodate() local
461 if (iop) { in iomap_is_partially_uptodate()
463 if (!test_bit(i, iop->uptodate)) in iomap_is_partially_uptodate()
571 struct iomap_page *iop = iomap_page_create(inode, page); in __iomap_write_begin() local
583 iomap_adjust_read_range(inode, iop, &block_start, in __iomap_write_begin()