Lines Matching refs:ioend

36 static inline bool xfs_ioend_is_append(struct iomap_ioend *ioend)  in xfs_ioend_is_append()  argument
38 return ioend->io_offset + ioend->io_size > in xfs_ioend_is_append()
39 XFS_I(ioend->io_inode)->i_disk_size; in xfs_ioend_is_append()
82 struct iomap_ioend *ioend) in xfs_end_ioend() argument
84 struct xfs_inode *ip = XFS_I(ioend->io_inode); in xfs_end_ioend()
86 xfs_off_t offset = ioend->io_offset; in xfs_end_ioend()
87 size_t size = ioend->io_size; in xfs_end_ioend()
113 error = blk_status_to_errno(ioend->io_bio->bi_status); in xfs_end_ioend()
115 if (ioend->io_flags & IOMAP_F_SHARED) { in xfs_end_ioend()
127 if (ioend->io_flags & IOMAP_F_SHARED) in xfs_end_ioend()
129 else if (ioend->io_type == IOMAP_UNWRITTEN) in xfs_end_ioend()
132 if (!error && xfs_ioend_is_append(ioend)) in xfs_end_ioend()
133 error = xfs_setfilesize(ip, ioend->io_offset, ioend->io_size); in xfs_end_ioend()
135 iomap_finish_ioends(ioend, error); in xfs_end_ioend()
159 struct iomap_ioend *ioend; in xfs_end_io() local
168 while ((ioend = list_first_entry_or_null(&tmp, struct iomap_ioend, in xfs_end_io()
170 list_del_init(&ioend->io_list); in xfs_end_io()
171 iomap_ioend_try_merge(ioend, &tmp); in xfs_end_io()
172 xfs_end_ioend(ioend); in xfs_end_io()
181 struct iomap_ioend *ioend = bio->bi_private; in xfs_end_bio() local
182 struct xfs_inode *ip = XFS_I(ioend->io_inode); in xfs_end_bio()
189 list_add_tail(&ioend->io_list, &ip->i_ioend_list); in xfs_end_bio()
415 struct iomap_ioend *ioend, in xfs_prepare_ioend() argument
428 if (!status && (ioend->io_flags & IOMAP_F_SHARED)) { in xfs_prepare_ioend()
429 status = xfs_reflink_convert_cow(XFS_I(ioend->io_inode), in xfs_prepare_ioend()
430 ioend->io_offset, ioend->io_size); in xfs_prepare_ioend()
436 if (xfs_ioend_is_append(ioend) || ioend->io_type == IOMAP_UNWRITTEN || in xfs_prepare_ioend()
437 (ioend->io_flags & IOMAP_F_SHARED)) in xfs_prepare_ioend()
438 ioend->io_bio->bi_end_io = xfs_end_bio; in xfs_prepare_ioend()