aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_qm.c
diff options
context:
space:
mode:
authorJeff Liu <jeff.liu@oracle.com>2013-01-28 08:26:34 -0500
committerBen Myers <bpm@sgi.com>2013-02-01 15:42:32 -0500
commitf910a8c620e21fdb53384ad741ff9e4995cc6e67 (patch)
tree402e2a42dc99b6bdac604e61c64ab7971ae19637 /fs/xfs/xfs_qm.c
parentb0c10b983a3e5cc35f239999df1b8bad1ba5b8f6 (diff)
xfs: calculate xfs_qm_write_sb_changes() space log reservation at mount time
For the transaction that write the incore superblock changes of quota flags to disk, it would reserve the same log space to clear/reset quota flags transaction, hence we can use XFS_TRANS_SBCHANGE_LOG_RES() for it as well. Signed-off-by: Jie Liu <jeff.liu@oracle.com> CC: Dave Chinner <david@fromorbit.com> Reviewed-by: Mark Tinguely <tinguely@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_qm.c')
-rw-r--r--fs/xfs/xfs_qm.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c
index 60eff4763156..e5b5cf973781 100644
--- a/fs/xfs/xfs_qm.c
+++ b/fs/xfs/xfs_qm.c
@@ -1584,10 +1584,9 @@ xfs_qm_write_sb_changes(
1584 int error; 1584 int error;
1585 1585
1586 tp = xfs_trans_alloc(mp, XFS_TRANS_QM_SBCHANGE); 1586 tp = xfs_trans_alloc(mp, XFS_TRANS_QM_SBCHANGE);
1587 if ((error = xfs_trans_reserve(tp, 0, 1587 error = xfs_trans_reserve(tp, 0, XFS_QM_SBCHANGE_LOG_RES(mp),
1588 mp->m_sb.sb_sectsize + 128, 0, 1588 0, 0, XFS_DEFAULT_LOG_COUNT);
1589 0, 1589 if (error) {
1590 XFS_DEFAULT_LOG_COUNT))) {
1591 xfs_trans_cancel(tp, 0); 1590 xfs_trans_cancel(tp, 0);
1592 return error; 1591 return error;
1593 } 1592 }