From: Eric Sandeen Date: Tue, 10 Jan 2017 02:18:49 +0000 (-0600) Subject: xfs: handle cow fork in xfs_bmap_trace_exlist X-Git-Tag: v4.10.0-rc1~66 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8f690d2497b6acda01c7efa23644fe7fc4ee937a;p=thirdparty%2Fxfsprogs-dev.git xfs: handle cow fork in xfs_bmap_trace_exlist Source kernel commit: c44a1f22626c153976289e1cd67bdcdfefc16e1f By inspection, xfs_bmap_trace_exlist isn't handling cow forks, and will trace the data fork instead. Fix this by setting state appropriately if whichfork == XFS_COW_FORK. ()___() < @ @ > | | {o_o} (|) Signed-off-by: Eric Sandeen Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner Signed-off-by: Eric Sandeen --- diff --git a/libxfs/xfs_bmap.c b/libxfs/xfs_bmap.c index 4417da885..ff67dcf6a 100644 --- a/libxfs/xfs_bmap.c +++ b/libxfs/xfs_bmap.c @@ -509,7 +509,7 @@ void xfs_bmap_trace_exlist( xfs_inode_t *ip, /* incore inode pointer */ xfs_extnum_t cnt, /* count of entries in the list */ - int whichfork, /* data or attr fork */ + int whichfork, /* data or attr or cow fork */ unsigned long caller_ip) { xfs_extnum_t idx; /* extent record index */ @@ -518,6 +518,8 @@ xfs_bmap_trace_exlist( if (whichfork == XFS_ATTR_FORK) state |= BMAP_ATTRFORK; + else if (whichfork == XFS_COW_FORK) + state |= BMAP_COWFORK; ifp = XFS_IFORK_PTR(ip, whichfork); ASSERT(cnt == xfs_iext_count(ifp));