diff options
author | Jeff Liu <jeff.liu@oracle.com> | 2013-01-28 08:26:16 -0500 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-02-01 15:40:17 -0500 |
commit | b0c10b983a3e5cc35f239999df1b8bad1ba5b8f6 (patch) | |
tree | 78c41025c277a87c1baea6eb2990572fdfb7bb70 /fs/xfs/xfs_trans.c | |
parent | 5b292ae3a951a58e32119d73c7ac8f5bec7395a3 (diff) |
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_trans.c')
-rw-r--r-- | fs/xfs/xfs_trans.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c index a81625c75a91..6ba62c0e24d1 100644 --- a/fs/xfs/xfs_trans.c +++ b/fs/xfs/xfs_trans.c | |||
@@ -546,6 +546,17 @@ xfs_calc_clear_agi_bucket_reservation( | |||
546 | } | 546 | } |
547 | 547 | ||
548 | /* | 548 | /* |
549 | * Clearing the quotaflags in the superblock. | ||
550 | * the super block for changing quota flags: sector size | ||
551 | */ | ||
552 | STATIC uint | ||
553 | xfs_calc_qm_sbchange_reservation( | ||
554 | struct xfs_mount *mp) | ||
555 | { | ||
556 | return xfs_calc_buf_res(1, mp->m_sb.sb_sectsize); | ||
557 | } | ||
558 | |||
559 | /* | ||
549 | * Initialize the precomputed transaction reservation values | 560 | * Initialize the precomputed transaction reservation values |
550 | * in the mount structure. | 561 | * in the mount structure. |
551 | */ | 562 | */ |
@@ -576,6 +587,7 @@ xfs_trans_init( | |||
576 | resp->tr_growrtalloc = xfs_calc_growrtalloc_reservation(mp); | 587 | resp->tr_growrtalloc = xfs_calc_growrtalloc_reservation(mp); |
577 | resp->tr_growrtzero = xfs_calc_growrtzero_reservation(mp); | 588 | resp->tr_growrtzero = xfs_calc_growrtzero_reservation(mp); |
578 | resp->tr_growrtfree = xfs_calc_growrtfree_reservation(mp); | 589 | resp->tr_growrtfree = xfs_calc_growrtfree_reservation(mp); |
590 | resp->tr_qm_sbchange = xfs_calc_qm_sbchange_reservation(mp); | ||
579 | } | 591 | } |
580 | 592 | ||
581 | /* | 593 | /* |