diff options
author | Christoph Hellwig <hch@lst.de> | 2024-08-30 15:37:00 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2024-09-01 08:58:19 -0700 |
commit | a18a69bbec083093c3bfebaec13ce0b4c6b2af7e (patch) | |
tree | 0f7329daadc88304e086cfe48eb02ba5cc000a43 /fs | |
parent | 0a59e4f3e1670bc49d60e1bd1a9b19ca156ae9cb (diff) |
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: 578bd4ce7100 ("xfs: recompute growfsrtfree transaction reservation while growing rt volume")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/xfs_rtalloc.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c index d290749b0304..a9f08d96f1fe 100644 --- a/fs/xfs/xfs_rtalloc.c +++ b/fs/xfs/xfs_rtalloc.c @@ -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; |