xfs: introduce the CoW fork

Introduce a new in-core fork for storing copy-on-write delalloc
reservations and allocated extents that are in the process of being
written out.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
Darrick J. Wong
2016-10-03 09:11:32 -07:00
parent 11715a21bc
commit 3993baeb3c
13 changed files with 264 additions and 28 deletions

View File

@@ -269,10 +269,10 @@ DECLARE_EVENT_CLASS(xfs_bmap_class,
__field(unsigned long, caller_ip)
),
TP_fast_assign(
struct xfs_ifork *ifp = (state & BMAP_ATTRFORK) ?
ip->i_afp : &ip->i_df;
struct xfs_ifork *ifp;
struct xfs_bmbt_irec r;
ifp = xfs_iext_state_to_fork(ip, state);
xfs_bmbt_get_all(xfs_iext_get_ext(ifp, idx), &r);
__entry->dev = VFS_I(ip)->i_sb->s_dev;
__entry->ino = ip->i_ino;