]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: remove the special COW fork handling in xfs_bmapi_read
authorChristoph Hellwig <hch@lst.de>
Mon, 10 Aug 2020 20:32:06 +0000 (16:32 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Mon, 10 Aug 2020 20:32:06 +0000 (16:32 -0400)
Source kernel commit: 1a1c57b2826f8b408feb733d3321490591a6e4c9

We don't call xfs_bmapi_read for the COW fork anymore, so remove the
special casing.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_bmap.c

index 11f3f5f9d2071a3f5176a413573dd39cb9fbeeb5..904cc5dfe0e14ee5a64eea588ad99fbcdfc4d937 100644 (file)
@@ -3895,8 +3895,7 @@ xfs_bmapi_read(
        int                     whichfork = xfs_bmapi_whichfork(flags);
 
        ASSERT(*nmap >= 1);
-       ASSERT(!(flags & ~(XFS_BMAPI_ATTRFORK|XFS_BMAPI_ENTIRE|
-                          XFS_BMAPI_COWFORK)));
+       ASSERT(!(flags & ~(XFS_BMAPI_ATTRFORK | XFS_BMAPI_ENTIRE)));
        ASSERT(xfs_isilocked(ip, XFS_ILOCK_SHARED|XFS_ILOCK_EXCL));
 
        if (XFS_IS_CORRUPT(mp, !xfs_ifork_has_extents(ip, whichfork)) ||
@@ -3911,16 +3910,6 @@ xfs_bmapi_read(
 
        ifp = XFS_IFORK_PTR(ip, whichfork);
        if (!ifp) {
-               /* No CoW fork?  Return a hole. */
-               if (whichfork == XFS_COW_FORK) {
-                       mval->br_startoff = bno;
-                       mval->br_startblock = HOLESTARTBLOCK;
-                       mval->br_blockcount = len;
-                       mval->br_state = XFS_EXT_NORM;
-                       *nmap = 1;
-                       return 0;
-               }
-
                /*
                 * A missing attr ifork implies that the inode says we're in
                 * extents or btree format but failed to pass the inode fork