From: Darrick J. Wong Date: Mon, 11 Dec 2017 02:03:56 +0000 (-0800) Subject: xfs: allow CoW remap transactions to use reserve blocks X-Git-Tag: v4.19~1885^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a192de265b26c525672884630d5376c405e83b2a;p=platform%2Fkernel%2Flinux-rpi.git xfs: allow CoW remap transactions to use reserve blocks 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 Reviewed-by: Christoph Hellwig --- diff --git a/fs/xfs/xfs_reflink.c b/fs/xfs/xfs_reflink.c index 6931b0c..e49e6db 100644 --- a/fs/xfs/xfs_reflink.c +++ b/fs/xfs/xfs_reflink.c @@ -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;