Commit 4081d4a7 authored by Eric Sandeen's avatar Eric Sandeen Committed by Greg Kroah-Hartman

xfs: handle cow fork in xfs_bmap_trace_exlist

commit c44a1f22 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: default avatarEric Sandeen <sandeen@redhat.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a585e1c4
...@@ -518,7 +518,7 @@ void ...@@ -518,7 +518,7 @@ void
xfs_bmap_trace_exlist( xfs_bmap_trace_exlist(
xfs_inode_t *ip, /* incore inode pointer */ xfs_inode_t *ip, /* incore inode pointer */
xfs_extnum_t cnt, /* count of entries in the list */ 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) unsigned long caller_ip)
{ {
xfs_extnum_t idx; /* extent record index */ xfs_extnum_t idx; /* extent record index */
...@@ -527,6 +527,8 @@ xfs_bmap_trace_exlist( ...@@ -527,6 +527,8 @@ xfs_bmap_trace_exlist(
if (whichfork == XFS_ATTR_FORK) if (whichfork == XFS_ATTR_FORK)
state |= BMAP_ATTRFORK; state |= BMAP_ATTRFORK;
else if (whichfork == XFS_COW_FORK)
state |= BMAP_COWFORK;
ifp = XFS_IFORK_PTR(ip, whichfork); ifp = XFS_IFORK_PTR(ip, whichfork);
ASSERT(cnt == xfs_iext_count(ifp)); ASSERT(cnt == xfs_iext_count(ifp));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment