Commit a18a69bb authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Darrick J. Wong
Browse files

xfs: use the recalculated transaction reservation in xfs_growfs_rt_bmblock



After going great length to calculate the transaction reservation for
the new geometry, we should also use it to allocate the transaction it
was calculated for.

Fixes: 578bd4ce ("xfs: recompute growfsrtfree transaction reservation while growing rt volume")
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDarrick J. Wong <djwong@kernel.org>
Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
parent 0a59e4f3
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -730,10 +730,12 @@ xfs_growfs_rt_bmblock(
		xfs_rtsummary_blockcount(mp, nmp->m_rsumlevels,
			nmp->m_sb.sb_rbmblocks));

	/* recompute growfsrt reservation from new rsumsize */
	/*
	 * Recompute the growfsrt reservation from the new rsumsize, so that the
	 * transaction below use the new, potentially larger value.
	 * */
	xfs_trans_resv_calc(nmp, &nmp->m_resv);

	error = xfs_trans_alloc(mp, &M_RES(mp)->tr_growrtfree, 0, 0, 0,
	error = xfs_trans_alloc(mp, &M_RES(nmp)->tr_growrtfree, 0, 0, 0,
			&args.tp);
	if (error)
		goto out_free;