Lines Matching refs:ioend
38 static inline bool xfs_ioend_is_append(struct iomap_ioend *ioend) in xfs_ioend_is_append() argument
40 return ioend->io_offset + ioend->io_size > in xfs_ioend_is_append()
41 XFS_I(ioend->io_inode)->i_disk_size; in xfs_ioend_is_append()
84 struct iomap_ioend *ioend) in xfs_end_ioend() argument
86 struct xfs_inode *ip = XFS_I(ioend->io_inode); in xfs_end_ioend()
88 xfs_off_t offset = ioend->io_offset; in xfs_end_ioend()
89 size_t size = ioend->io_size; in xfs_end_ioend()
115 error = blk_status_to_errno(ioend->io_bio->bi_status); in xfs_end_ioend()
117 if (ioend->io_flags & IOMAP_F_SHARED) { in xfs_end_ioend()
128 if (ioend->io_flags & IOMAP_F_SHARED) in xfs_end_ioend()
130 else if (ioend->io_type == IOMAP_UNWRITTEN) in xfs_end_ioend()
133 if (!error && xfs_ioend_is_append(ioend)) in xfs_end_ioend()
134 error = xfs_setfilesize(ip, ioend->io_offset, ioend->io_size); in xfs_end_ioend()
136 iomap_finish_ioends(ioend, error); in xfs_end_ioend()
160 struct iomap_ioend *ioend; in xfs_end_io() local
169 while ((ioend = list_first_entry_or_null(&tmp, struct iomap_ioend, in xfs_end_io()
171 list_del_init(&ioend->io_list); in xfs_end_io()
172 iomap_ioend_try_merge(ioend, &tmp); in xfs_end_io()
173 xfs_end_ioend(ioend); in xfs_end_io()
182 struct iomap_ioend *ioend = bio->bi_private; in xfs_end_bio() local
183 struct xfs_inode *ip = XFS_I(ioend->io_inode); in xfs_end_bio()
190 list_add_tail(&ioend->io_list, &ip->i_ioend_list); in xfs_end_bio()
424 struct iomap_ioend *ioend, in xfs_prepare_ioend() argument
437 if (!status && (ioend->io_flags & IOMAP_F_SHARED)) { in xfs_prepare_ioend()
438 status = xfs_reflink_convert_cow(XFS_I(ioend->io_inode), in xfs_prepare_ioend()
439 ioend->io_offset, ioend->io_size); in xfs_prepare_ioend()
445 if (xfs_ioend_is_append(ioend) || ioend->io_type == IOMAP_UNWRITTEN || in xfs_prepare_ioend()
446 (ioend->io_flags & IOMAP_F_SHARED)) in xfs_prepare_ioend()
447 ioend->io_bio->bi_end_io = xfs_end_bio; in xfs_prepare_ioend()