summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_mount.c
diff options
context:
space:
mode:
authorJeff Liu <jeff.liu@oracle.com>2013-01-28 14:26:16 +0100
committerBen Myers <bpm@sgi.com>2013-02-01 21:40:17 +0100
commitb0c10b983a3e5cc35f239999df1b8bad1ba5b8f6 (patch)
tree78c41025c277a87c1baea6eb2990572fdfb7bb70 /fs/xfs/xfs_mount.c
parentxfs: make use of xfs_calc_buf_res() in xfs_trans.c (diff)
downloadlinux-b0c10b983a3e5cc35f239999df1b8bad1ba5b8f6.tar.xz
linux-b0c10b983a3e5cc35f239999df1b8bad1ba5b8f6.zip
xfs: calculate XFS_TRANS_QM_SBCHANGE space log reservation at mount time
The transaction log space for clearing/reseting the quota flags is calculated out at runtime, this patch can figure it out at mount time. 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_mount.c')
-rw-r--r--fs/xfs/xfs_mount.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index 7d6df7c00c36..0db40205778a 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -1109,8 +1109,8 @@ xfs_mount_reset_sbqflags(
return 0;
tp = xfs_trans_alloc(mp, XFS_TRANS_QM_SBCHANGE);
- 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);
xfs_alert(mp, "%s: Superblock update failed!", __func__);