Make disk quota related transactions aware of this change
PATCH 4/4 Make disk quota related transactions aware of this change
Make disk quota related transaction reservation works with this new wrapper.
Signed-off-by Jie Liu <[email protected]>
Cc Dave Chinner <[email protected]>
--- fs/xfs/xfs_dquot.c | 6 ++++-- fs/xfs/xfs_qm.c | 6 +++--- fs/xfs/xfs_qm_syscalls.c | 20 +++++++++++--------- 3 files changed, 18 insertions(+), 14 deletions(-)
fs/xfs/xfs_dquot.c +4 -2
@@ -527,9 +527,11 @@ xfs_qm_dqread(XFS_WRITE_LOG_RES (mp) +/* * Round the chunklen up to the next multiple -* of 128 (buf log item chunk size)). +* of xfs_buf_log_overhead(), that is buf log +* item chunk size. */ -BBTOB (mp->m_quotainfo->qi_dqchunklen) -1 +128 , +BBTOB (mp->m_quotainfo->qi_dqchunklen) -1 + +xfs_buf_log_overhead (),0 ,XFS_TRANS_PERM_LOG_RES , XFS_WRITE_LOG_COUNT);
fs/xfs/xfs_qm.c +3 -3
@@ -1583,9 +1583,9 @@ xfs_qm_write_sb_changes( 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 ))) { + mp->m_sb.sb_sectsize + +xfs_buf_log_overhead (),0 ,0 , +XFS_DEFAULT_LOG_COUNT ))) {xfs_trans_cancel (tp,0 );return error; }
fs/xfs/xfs_qm_syscalls.c +11 -9
@@ -489,8 +489,11 @@ xfs_qm_scall_setqlim(return 0 ; tp =xfs_trans_alloc (mp,XFS_TRANS_QM_SETQLIM ); -if ((error =xfs_trans_reserve (tp,0 ,sizeof (xfs_disk_dquot_t) +128 , -0 ,0 ,XFS_DEFAULT_LOG_COUNT ))) { + error =xfs_trans_reserve (tp,0 , +sizeof (xfs_disk_dquot_t) + +xfs_buf_log_overhead (),0 ,0 , +XFS_DEFAULT_LOG_COUNT ); +if (error) {xfs_trans_cancel (tp,0 );return (error); }
@@ -670,14 +673,13 @@ xfs_qm_log_quotaoff(uint oldsbqflag=0 ; tp =xfs_trans_alloc (mp,XFS_TRANS_QM_QUOTAOFF ); -if ((error =xfs_trans_reserve (tp,0 , -sizeof (xfs_qoff_logitem_t) *2 + - mp->m_sb.sb_sectsize +128 , -0 , -0 , -XFS_DEFAULT_LOG_COUNT ))) { + error =xfs_trans_reserve (tp,0 , +sizeof (xfs_qoff_logitem_t) *2 + + mp->m_sb.sb_sectsize + +xfs_buf_log_overhead (),0 ,0 , +XFS_DEFAULT_LOG_COUNT ); +if (error) goto error0; - } qoffi =xfs_trans_get_qoff_item (tp,NULL , flags &XFS_ALL_QUOTA_ACCT );xfs_trans_log_quotaoff_item (tp, qoffi);
Signature · 6 lines
1.7.9.5 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs