Lines Matching refs:ip
47 struct xfs_inode *ip, in xfs_setfilesize() argument
51 struct xfs_mount *mp = ip->i_mount; in xfs_setfilesize()
60 xfs_ilock(ip, XFS_ILOCK_EXCL); in xfs_setfilesize()
61 isize = xfs_new_eof(ip, offset + size); in xfs_setfilesize()
63 xfs_iunlock(ip, XFS_ILOCK_EXCL); in xfs_setfilesize()
68 trace_xfs_setfilesize(ip, offset, size); in xfs_setfilesize()
70 ip->i_disk_size = isize; in xfs_setfilesize()
71 xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); in xfs_setfilesize()
72 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); in xfs_setfilesize()
84 struct xfs_inode *ip = XFS_I(ioend->io_inode); in xfs_end_ioend() local
85 struct xfs_mount *mp = ip->i_mount; in xfs_end_ioend()
116 xfs_reflink_cancel_cow_range(ip, offset, size, true); in xfs_end_ioend()
117 xfs_bmap_punch_delalloc_range(ip, in xfs_end_ioend()
128 error = xfs_reflink_end_cow(ip, offset, size); in xfs_end_ioend()
130 error = xfs_iomap_write_unwritten(ip, offset, size, false); in xfs_end_ioend()
133 error = xfs_setfilesize(ip, ioend->io_offset, ioend->io_size); in xfs_end_ioend()
157 struct xfs_inode *ip = in xfs_end_io() local
163 spin_lock_irqsave(&ip->i_ioend_lock, flags); in xfs_end_io()
164 list_replace_init(&ip->i_ioend_list, &tmp); in xfs_end_io()
165 spin_unlock_irqrestore(&ip->i_ioend_lock, flags); in xfs_end_io()
182 struct xfs_inode *ip = XFS_I(ioend->io_inode); in xfs_end_bio() local
185 spin_lock_irqsave(&ip->i_ioend_lock, flags); in xfs_end_bio()
186 if (list_empty(&ip->i_ioend_list)) in xfs_end_bio()
187 WARN_ON_ONCE(!queue_work(ip->i_mount->m_unwritten_workqueue, in xfs_end_bio()
188 &ip->i_ioend_work)); in xfs_end_bio()
189 list_add_tail(&ioend->io_list, &ip->i_ioend_list); in xfs_end_bio()
190 spin_unlock_irqrestore(&ip->i_ioend_lock, flags); in xfs_end_bio()
200 struct xfs_inode *ip, in xfs_imap_valid() argument
221 if (XFS_WPC(wpc)->data_seq != READ_ONCE(ip->i_df.if_seq)) in xfs_imap_valid()
223 if (xfs_inode_has_cow_data(ip) && in xfs_imap_valid()
224 XFS_WPC(wpc)->cow_seq != READ_ONCE(ip->i_cowfp->if_seq)) in xfs_imap_valid()
240 struct xfs_inode *ip, in xfs_convert_blocks() argument
259 error = xfs_bmapi_convert_delalloc(ip, whichfork, offset, in xfs_convert_blocks()
274 struct xfs_inode *ip = XFS_I(inode); in xfs_map_blocks() local
275 struct xfs_mount *mp = ip->i_mount; in xfs_map_blocks()
304 if (xfs_imap_valid(wpc, ip, offset)) in xfs_map_blocks()
316 xfs_ilock(ip, XFS_ILOCK_SHARED); in xfs_map_blocks()
317 ASSERT(!xfs_need_iread_extents(&ip->i_df)); in xfs_map_blocks()
323 if (xfs_inode_has_cow_data(ip) && in xfs_map_blocks()
324 xfs_iext_lookup_extent(ip, ip->i_cowfp, offset_fsb, &icur, &imap)) in xfs_map_blocks()
327 XFS_WPC(wpc)->cow_seq = READ_ONCE(ip->i_cowfp->if_seq); in xfs_map_blocks()
328 xfs_iunlock(ip, XFS_ILOCK_SHARED); in xfs_map_blocks()
338 if (xfs_imap_valid(wpc, ip, offset)) { in xfs_map_blocks()
339 xfs_iunlock(ip, XFS_ILOCK_SHARED); in xfs_map_blocks()
348 if (!xfs_iext_lookup_extent(ip, &ip->i_df, offset_fsb, &icur, &imap)) in xfs_map_blocks()
350 XFS_WPC(wpc)->data_seq = READ_ONCE(ip->i_df.if_seq); in xfs_map_blocks()
351 xfs_iunlock(ip, XFS_ILOCK_SHARED); in xfs_map_blocks()
376 xfs_bmbt_to_iomap(ip, &wpc->iomap, &imap, 0, 0); in xfs_map_blocks()
377 trace_xfs_map_blocks_found(ip, offset, count, whichfork, &imap); in xfs_map_blocks()
380 error = xfs_convert_blocks(wpc, ip, whichfork, offset); in xfs_map_blocks()
409 trace_xfs_map_blocks_alloc(ip, offset, count, whichfork, &imap); in xfs_map_blocks()
459 struct xfs_inode *ip = XFS_I(inode); in xfs_discard_folio() local
460 struct xfs_mount *mp = ip->i_mount; in xfs_discard_folio()
471 folio, ip->i_ino, pos); in xfs_discard_folio()
473 error = xfs_bmap_punch_delalloc_range(ip, start_fsb, in xfs_discard_folio()
508 struct xfs_inode *ip = XFS_I(mapping->host); in xfs_dax_writepages() local
510 xfs_iflags_clear(ip, XFS_ITRUNCATED); in xfs_dax_writepages()
512 xfs_inode_buftarg(ip)->bt_daxdev, wbc); in xfs_dax_writepages()
520 struct xfs_inode *ip = XFS_I(mapping->host); in xfs_vm_bmap() local
522 trace_xfs_vm_bmap(ip); in xfs_vm_bmap()
533 if (xfs_is_cow_inode(ip) || XFS_IS_REALTIME_INODE(ip)) in xfs_vm_bmap()