aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@sandeen.net>2017-01-09 10:38:50 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-12 05:39:42 -0500
commit4081d4a79a95252486569b014b9a666ad5bfdbee (patch)
tree8f19d3cc5ea2ec1c712ccfe826a7ddec3d244b7d /fs
parenta585e1c4ec939d1cc5ce8776c606733d046072da (diff)
xfs: handle cow fork in xfs_bmap_trace_exlist
commit c44a1f22626c153976289e1cd67bdcdfefc16e1f upstream. 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 <sandeen@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/libxfs/xfs_bmap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
index cfd1fdd327eb..d4481d4383ee 100644
--- a/fs/xfs/libxfs/xfs_bmap.c
+++ b/fs/xfs/libxfs/xfs_bmap.c
@@ -518,7 +518,7 @@ void
518xfs_bmap_trace_exlist( 518xfs_bmap_trace_exlist(
519 xfs_inode_t *ip, /* incore inode pointer */ 519 xfs_inode_t *ip, /* incore inode pointer */
520 xfs_extnum_t cnt, /* count of entries in the list */ 520 xfs_extnum_t cnt, /* count of entries in the list */
521 int whichfork, /* data or attr fork */ 521 int whichfork, /* data or attr or cow fork */
522 unsigned long caller_ip) 522 unsigned long caller_ip)
523{ 523{
524 xfs_extnum_t idx; /* extent record index */ 524 xfs_extnum_t idx; /* extent record index */
@@ -527,6 +527,8 @@ xfs_bmap_trace_exlist(
527 527
528 if (whichfork == XFS_ATTR_FORK) 528 if (whichfork == XFS_ATTR_FORK)
529 state |= BMAP_ATTRFORK; 529 state |= BMAP_ATTRFORK;
530 else if (whichfork == XFS_COW_FORK)
531 state |= BMAP_COWFORK;
530 532
531 ifp = XFS_IFORK_PTR(ip, whichfork); 533 ifp = XFS_IFORK_PTR(ip, whichfork);
532 ASSERT(cnt == xfs_iext_count(ifp)); 534 ASSERT(cnt == xfs_iext_count(ifp));