|
@@ -248,7 +248,8 @@ __xfs_ag_resv_init(
|
|
|
/* Create a per-AG block reservation. */
|
|
|
int
|
|
|
xfs_ag_resv_init(
|
|
|
- struct xfs_perag *pag)
|
|
|
+ struct xfs_perag *pag,
|
|
|
+ struct xfs_trans *tp)
|
|
|
{
|
|
|
struct xfs_mount *mp = pag->pag_mount;
|
|
|
xfs_agnumber_t agno = pag->pag_agno;
|
|
@@ -260,11 +261,11 @@ xfs_ag_resv_init(
|
|
|
if (pag->pag_meta_resv.ar_asked == 0) {
|
|
|
ask = used = 0;
|
|
|
|
|
|
- error = xfs_refcountbt_calc_reserves(mp, agno, &ask, &used);
|
|
|
+ error = xfs_refcountbt_calc_reserves(mp, tp, agno, &ask, &used);
|
|
|
if (error)
|
|
|
goto out;
|
|
|
|
|
|
- error = xfs_finobt_calc_reserves(mp, agno, &ask, &used);
|
|
|
+ error = xfs_finobt_calc_reserves(mp, tp, agno, &ask, &used);
|
|
|
if (error)
|
|
|
goto out;
|
|
|
|
|
@@ -282,7 +283,7 @@ xfs_ag_resv_init(
|
|
|
|
|
|
mp->m_inotbt_nores = true;
|
|
|
|
|
|
- error = xfs_refcountbt_calc_reserves(mp, agno, &ask,
|
|
|
+ error = xfs_refcountbt_calc_reserves(mp, tp, agno, &ask,
|
|
|
&used);
|
|
|
if (error)
|
|
|
goto out;
|
|
@@ -298,7 +299,7 @@ xfs_ag_resv_init(
|
|
|
if (pag->pag_rmapbt_resv.ar_asked == 0) {
|
|
|
ask = used = 0;
|
|
|
|
|
|
- error = xfs_rmapbt_calc_reserves(mp, agno, &ask, &used);
|
|
|
+ error = xfs_rmapbt_calc_reserves(mp, tp, agno, &ask, &used);
|
|
|
if (error)
|
|
|
goto out;
|
|
|
|
|
@@ -309,7 +310,7 @@ xfs_ag_resv_init(
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
/* need to read in the AGF for the ASSERT below to work */
|
|
|
- error = xfs_alloc_pagf_init(pag->pag_mount, NULL, pag->pag_agno, 0);
|
|
|
+ error = xfs_alloc_pagf_init(pag->pag_mount, tp, pag->pag_agno, 0);
|
|
|
if (error)
|
|
|
return error;
|
|
|
|