Thread (60 messages) 60 messages, 4 authors, 2018-01-27

Re: [PATCH 03/11] xfs: call xfs_qm_dqattach before performing reflink operations

From: Brian Foster <hidden>
Date: 2018-01-24 14:18:31

On Tue, Jan 23, 2018 at 06:18:17PM -0800, Darrick J. Wong wrote:
From: Darrick J. Wong <redacted>

Ensure that we've attached all the necessary dquots before performing
reflink operations so that quota accounting is accurate.

Signed-off-by: Darrick J. Wong <redacted>
---
Reviewed-by: Brian Foster <redacted>
quoted hunk ↗ jump to hunk
 fs/xfs/xfs_reflink.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/fs/xfs/xfs_reflink.c b/fs/xfs/xfs_reflink.c
index f5a43b2..82abff6 100644
--- a/fs/xfs/xfs_reflink.c
+++ b/fs/xfs/xfs_reflink.c
@@ -1345,6 +1345,11 @@ xfs_reflink_remap_range(
 	if (ret <= 0)
 		goto out_unlock;
 
+	/* Attach dquots to dest inode before changing block map */
+	ret = xfs_qm_dqattach(dest, 0);
+	if (ret)
+		goto out_unlock;
+
 	trace_xfs_reflink_remap_range(src, pos_in, len, dest, pos_out);
 
 	/*

--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help