Lines Matching refs:pos
179 iomap_dio_zero(struct iomap_dio *dio, struct iomap *iomap, loff_t pos, in iomap_dio_zero() argument
188 fscrypt_set_bio_crypt_ctx(bio, inode, pos >> inode->i_blkbits, in iomap_dio_zero()
191 bio->bi_iter.bi_sector = iomap_sector(iomap, pos); in iomap_dio_zero()
202 iomap_dio_bio_actor(struct inode *inode, loff_t pos, loff_t length, in iomap_dio_bio_actor() argument
215 if ((pos | length | align) & ((1 << blkbits) - 1)) in iomap_dio_bio_actor()
255 pad = pos & (fs_block_size - 1); in iomap_dio_bio_actor()
257 iomap_dio_zero(dio, iomap, pos - pad, pad); in iomap_dio_bio_actor()
268 fscrypt_set_bio_crypt_ctx(bio, inode, pos >> inode->i_blkbits, in iomap_dio_bio_actor()
271 bio->bi_iter.bi_sector = iomap_sector(iomap, pos); in iomap_dio_bio_actor()
306 pos += n; in iomap_dio_bio_actor()
321 ((dio->flags & IOMAP_DIO_WRITE) && pos >= i_size_read(inode))) { in iomap_dio_bio_actor()
323 pad = pos & (fs_block_size - 1); in iomap_dio_bio_actor()
325 iomap_dio_zero(dio, iomap, pos, fs_block_size - pad); in iomap_dio_bio_actor()
341 iomap_dio_inline_actor(struct inode *inode, loff_t pos, loff_t length, in iomap_dio_inline_actor() argument
347 BUG_ON(pos + length > PAGE_SIZE - offset_in_page(iomap->inline_data)); in iomap_dio_inline_actor()
352 if (pos > size) in iomap_dio_inline_actor()
353 memset(iomap->inline_data + size, 0, pos - size); in iomap_dio_inline_actor()
354 copied = copy_from_iter(iomap->inline_data + pos, length, iter); in iomap_dio_inline_actor()
356 if (pos + copied > size) in iomap_dio_inline_actor()
357 i_size_write(inode, pos + copied); in iomap_dio_inline_actor()
361 copied = copy_to_iter(iomap->inline_data + pos, length, iter); in iomap_dio_inline_actor()
368 iomap_dio_actor(struct inode *inode, loff_t pos, loff_t length, in iomap_dio_actor() argument
381 return iomap_dio_bio_actor(inode, pos, length, dio, iomap); in iomap_dio_actor()
383 return iomap_dio_bio_actor(inode, pos, length, dio, iomap); in iomap_dio_actor()
385 return iomap_dio_inline_actor(inode, pos, length, dio, iomap); in iomap_dio_actor()
408 loff_t pos = iocb->ki_pos, start = pos; in iomap_dio_rw() local
438 if (pos >= dio->i_size) in iomap_dio_rw()
496 ret = iomap_apply(inode, pos, count, flags, ops, dio, in iomap_dio_rw()
506 pos += ret; in iomap_dio_rw()
508 if (iov_iter_rw(iter) == READ && pos >= dio->i_size) { in iomap_dio_rw()
514 iov_iter_revert(iter, pos - dio->i_size); in iomap_dio_rw()