diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2020-09-14 15:26:42 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2020-10-10 10:57:54 -0700 |
commit | 719f91e92a644814f60230f9435f58a4d41e13de (patch) | |
tree | 7797bb4aff0f6312ec748455535e01e6352cb49f /fs/xfs/xfs_log_recover.c | |
parent | fd4b722753f94109887c79a6f433c1c9856f2c88 (diff) |
xfs: xfs_defer_capture should absorb remaining transaction reservationfix-recovery-intent-chaining_2020-10-10
When xfs_defer_capture extracts the deferred ops and transaction state
from a transaction, it should record the transaction reservation type
from the old transaction so that when we continue the dfops chain, we
still use the same reservation parameters.
This avoids a potential failure vector by ensuring that we never ask for
more log reservation space than we would have asked for had the system
not gone down.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_log_recover.c')
-rw-r--r-- | fs/xfs/xfs_log_recover.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index c12f565ae72e..5e588ba2717b 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c @@ -2523,8 +2523,8 @@ xlog_finish_defer_ops( int error = 0; list_for_each_entry_safe(dfc, next, capture_list, dfc_list) { - error = xfs_trans_alloc(mp, &M_RES(mp)->tr_itruncate, 0, - 0, XFS_TRANS_RESERVE, &tp); + error = xfs_trans_alloc(mp, &dfc->dfc_tres, 0, 0, + XFS_TRANS_RESERVE, &tp); if (error) return error; |