• Home
  • Raw
  • Download

Lines Matching refs:pos

89 		loff_t *pos, loff_t length, unsigned *offp, unsigned *lenp)  in iomap_adjust_read_range()  argument
91 loff_t orig_pos = *pos; in iomap_adjust_read_range()
95 unsigned poff = offset_in_page(*pos); in iomap_adjust_read_range()
112 *pos += block_size; in iomap_adjust_read_range()
238 loff_t pos) in iomap_block_needs_zeroing() argument
244 pos >= i_size_read(iter->inode); in iomap_block_needs_zeroing()
251 loff_t pos = iter->pos + offset; in iomap_readpage_iter() local
255 loff_t orig_pos = pos; in iomap_readpage_iter()
269 iomap_adjust_read_range(iter->inode, iop, &pos, length, &poff, &plen); in iomap_readpage_iter()
273 if (iomap_block_needs_zeroing(iter, pos)) { in iomap_readpage_iter()
283 sector = iomap_sector(iomap, pos); in iomap_readpage_iter()
319 return pos - orig_pos + plen; in iomap_readpage_iter()
327 .pos = page_offset(page), in iomap_readpage()
367 if (ctx->cur_page && offset_in_page(iter->pos + done) == 0) { in iomap_readahead_iter()
404 .pos = readahead_pos(rac), in iomap_readahead()
519 iomap_write_failed(struct inode *inode, loff_t pos, unsigned len) in iomap_write_failed() argument
527 if (pos + len > i_size) in iomap_write_failed()
528 truncate_pagecache_range(inode, max(pos, i_size), in iomap_write_failed()
529 pos + len - 1); in iomap_write_failed()
547 static int __iomap_write_begin(const struct iomap_iter *iter, loff_t pos, in __iomap_write_begin() argument
553 loff_t block_start = round_down(pos, block_size); in __iomap_write_begin()
554 loff_t block_end = round_up(pos + len, block_size); in __iomap_write_begin()
555 unsigned from = offset_in_page(pos), to = from + len, poff, plen; in __iomap_write_begin()
602 static int iomap_write_begin(const struct iomap_iter *iter, loff_t pos, in iomap_write_begin() argument
610 BUG_ON(pos + len > iter->iomap.offset + iter->iomap.length); in iomap_write_begin()
612 BUG_ON(pos + len > srcmap->offset + srcmap->length); in iomap_write_begin()
618 status = page_ops->page_prepare(iter->inode, pos, len); in iomap_write_begin()
624 pos >> PAGE_SHIFT, AOP_FLAG_NOFS); in iomap_write_begin()
633 status = __block_write_begin_int(page, pos, len, NULL, srcmap); in iomap_write_begin()
635 status = __iomap_write_begin(iter, pos, len, page); in iomap_write_begin()
646 iomap_write_failed(iter->inode, pos, len); in iomap_write_begin()
650 page_ops->page_done(iter->inode, pos, 0, NULL); in iomap_write_begin()
654 static size_t __iomap_write_end(struct inode *inode, loff_t pos, size_t len, in __iomap_write_end() argument
672 iomap_set_range_uptodate(page, offset_in_page(pos), len); in __iomap_write_end()
678 struct page *page, loff_t pos, size_t copied) in iomap_write_end_inline() argument
687 addr = kmap_local_page(page) + pos; in iomap_write_end_inline()
688 memcpy(iomap_inline_data(iomap, pos), addr, copied); in iomap_write_end_inline()
696 static size_t iomap_write_end(struct iomap_iter *iter, loff_t pos, size_t len, in iomap_write_end() argument
705 ret = iomap_write_end_inline(iter, page, pos, copied); in iomap_write_end()
707 ret = block_write_end(NULL, iter->inode->i_mapping, pos, len, in iomap_write_end()
710 ret = __iomap_write_end(iter->inode, pos, len, copied, page); in iomap_write_end()
718 if (pos + ret > old_size) { in iomap_write_end()
719 i_size_write(iter->inode, pos + ret); in iomap_write_end()
724 if (old_size < pos) in iomap_write_end()
725 pagecache_isize_extended(iter->inode, old_size, pos); in iomap_write_end()
727 page_ops->page_done(iter->inode, pos, ret, page); in iomap_write_end()
731 iomap_write_failed(iter->inode, pos, len); in iomap_write_end()
738 loff_t pos = iter->pos; in iomap_write_iter() local
748 offset = offset_in_page(pos); in iomap_write_iter()
766 status = iomap_write_begin(iter, pos, bytes, &page); in iomap_write_iter()
775 status = iomap_write_end(iter, pos, bytes, copied, page); in iomap_write_iter()
792 pos += status; in iomap_write_iter()
808 .pos = iocb->ki_pos, in iomap_file_buffered_write()
816 if (iter.pos == iocb->ki_pos) in iomap_file_buffered_write()
818 return iter.pos - iocb->ki_pos; in iomap_file_buffered_write()
826 loff_t pos = iter->pos; in iomap_unshare_iter() local
839 unsigned long offset = offset_in_page(pos); in iomap_unshare_iter()
843 status = iomap_write_begin(iter, pos, bytes, &page); in iomap_unshare_iter()
847 status = iomap_write_end(iter, pos, bytes, bytes, page); in iomap_unshare_iter()
853 pos += status; in iomap_unshare_iter()
864 iomap_file_unshare(struct inode *inode, loff_t pos, loff_t len, in iomap_file_unshare() argument
869 .pos = pos, in iomap_file_unshare()
881 static s64 __iomap_zero_iter(struct iomap_iter *iter, loff_t pos, u64 length) in __iomap_zero_iter() argument
885 unsigned offset = offset_in_page(pos); in __iomap_zero_iter()
888 status = iomap_write_begin(iter, pos, bytes, &page); in __iomap_zero_iter()
895 return iomap_write_end(iter, pos, bytes, bytes, page); in __iomap_zero_iter()
902 loff_t pos = iter->pos; in iomap_zero_iter() local
914 bytes = dax_iomap_zero(pos, length, iomap); in iomap_zero_iter()
916 bytes = __iomap_zero_iter(iter, pos, length); in iomap_zero_iter()
920 pos += bytes; in iomap_zero_iter()
931 iomap_zero_range(struct inode *inode, loff_t pos, loff_t len, bool *did_zero, in iomap_zero_range() argument
936 .pos = pos, in iomap_zero_range()
949 iomap_truncate_page(struct inode *inode, loff_t pos, bool *did_zero, in iomap_truncate_page() argument
953 unsigned int off = pos & (blocksize - 1); in iomap_truncate_page()
958 return iomap_zero_range(inode, pos, blocksize - off, did_zero, ops); in iomap_truncate_page()
969 ret = __block_write_begin_int(page, iter->pos, length, NULL, in iomap_page_mkwrite_iter()
995 iter.pos = page_offset(page); in iomap_page_mkwrite()