summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_qm.c
diff options
context:
space:
mode:
authorJeff Liu <jeff.liu@oracle.com>2013-01-28 13:26:34 (GMT)
committerBen Myers <bpm@sgi.com>2013-02-01 20:42:32 (GMT)
commitf910a8c620e21fdb53384ad741ff9e4995cc6e67 (patch)
tree402e2a42dc99b6bdac604e61c64ab7971ae19637 /fs/xfs/xfs_qm.c
parentb0c10b983a3e5cc35f239999df1b8bad1ba5b8f6 (diff)
downloadlinux-f910a8c620e21fdb53384ad741ff9e4995cc6e67.tar.xz
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 60eff47..e5b5cf9 100644
--- a/fs/xfs/xfs_qm.c
+++ b/fs/xfs/xfs_qm.c
@@ -1584,10 +1584,9 @@ xfs_qm_write_sb_changes(
int error;
tp = xfs_trans_alloc(mp, XFS_TRANS_QM_SBCHANGE);
- if ((error = xfs_trans_reserve(tp, 0,
- mp->m_sb.sb_sectsize + 128, 0,
- 0,
- XFS_DEFAULT_LOG_COUNT))) {
+ error = xfs_trans_reserve(tp, 0, XFS_QM_SBCHANGE_LOG_RES(mp),
+ 0, 0, XFS_DEFAULT_LOG_COUNT);
+ if (error) {
xfs_trans_cancel(tp, 0);
return error;
}