]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
xfs: allow CoW remap transactions to use reserve blocks
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 11 Dec 2017 02:03:56 +0000 (18:03 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 14 Dec 2017 17:20:11 +0000 (09:20 -0800)
Since we as yet have no way of holding on to the indlen blocks that are
reserved as part of CoW fork delalloc reservations, let the CoW remap
transaction dip into the reserves so that we avoid failing writes.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/xfs_reflink.c

index 6931b0c79cac2518ed41160ff8386f1706987888..e49e6db415f78c08836019d610b2575b3c60e8ab 100644 (file)
@@ -729,7 +729,7 @@ xfs_reflink_end_cow(
                        (unsigned int)(end_fsb - offset_fsb),
                        XFS_DATA_FORK);
        error = xfs_trans_alloc(ip->i_mount, &M_RES(ip->i_mount)->tr_write,
-                       resblks, 0, 0, &tp);
+                       resblks, 0, XFS_TRANS_RESERVE, &tp);
        if (error)
                goto out;