diff options
author | Christoph Hellwig <hch@infradead.org> | 2010-01-19 04:56:46 -0500 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2010-01-21 14:44:49 -0500 |
commit | a14a348bff2f99471a28e5928eb6801224c053d8 (patch) | |
tree | 9a34d7e988cd78bc9b19369cbad3ad009b9a2bfd /fs/xfs/quota | |
parent | 4139b3b337cffd106744386c842b89dc86e31d4b (diff) |
xfs: cleanup up xfs_log_force calling conventions
Remove the XFS_LOG_FORCE argument which was always set, and the
XFS_LOG_URGE define, which was never used.
Split xfs_log_force into a two helpers - xfs_log_force which forces
the whole log, and xfs_log_force_lsn which forces up to the
specified LSN. The underlying implementations already were entirely
separate, as were the users.
Also re-indent the new _xfs_log_force/_xfs_log_force which
previously had a weird coding style.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs/quota')
-rw-r--r-- | fs/xfs/quota/xfs_dquot.c | 10 | ||||
-rw-r--r-- | fs/xfs/quota/xfs_dquot_item.c | 9 | ||||
-rw-r--r-- | fs/xfs/quota/xfs_qm_syscalls.c | 4 |
3 files changed, 10 insertions, 13 deletions
diff --git a/fs/xfs/quota/xfs_dquot.c b/fs/xfs/quota/xfs_dquot.c index 5756392ffdee..f9baeedbfdfe 100644 --- a/fs/xfs/quota/xfs_dquot.c +++ b/fs/xfs/quota/xfs_dquot.c | |||
@@ -1248,7 +1248,7 @@ xfs_qm_dqflush( | |||
1248 | */ | 1248 | */ |
1249 | if (XFS_BUF_ISPINNED(bp)) { | 1249 | if (XFS_BUF_ISPINNED(bp)) { |
1250 | trace_xfs_dqflush_force(dqp); | 1250 | trace_xfs_dqflush_force(dqp); |
1251 | xfs_log_force(mp, (xfs_lsn_t)0, XFS_LOG_FORCE); | 1251 | xfs_log_force(mp, 0); |
1252 | } | 1252 | } |
1253 | 1253 | ||
1254 | if (flags & XFS_QMOPT_DELWRI) { | 1254 | if (flags & XFS_QMOPT_DELWRI) { |
@@ -1531,11 +1531,9 @@ xfs_qm_dqflock_pushbuf_wait( | |||
1531 | if (bp != NULL) { | 1531 | if (bp != NULL) { |
1532 | if (XFS_BUF_ISDELAYWRITE(bp)) { | 1532 | if (XFS_BUF_ISDELAYWRITE(bp)) { |
1533 | int error; | 1533 | int error; |
1534 | if (XFS_BUF_ISPINNED(bp)) { | 1534 | |
1535 | xfs_log_force(dqp->q_mount, | 1535 | if (XFS_BUF_ISPINNED(bp)) |
1536 | (xfs_lsn_t)0, | 1536 | xfs_log_force(dqp->q_mount, 0); |
1537 | XFS_LOG_FORCE); | ||
1538 | } | ||
1539 | error = xfs_bawrite(dqp->q_mount, bp); | 1537 | error = xfs_bawrite(dqp->q_mount, bp); |
1540 | if (error) | 1538 | if (error) |
1541 | xfs_fs_cmn_err(CE_WARN, dqp->q_mount, | 1539 | xfs_fs_cmn_err(CE_WARN, dqp->q_mount, |
diff --git a/fs/xfs/quota/xfs_dquot_item.c b/fs/xfs/quota/xfs_dquot_item.c index 116580d52fae..1b564376d50c 100644 --- a/fs/xfs/quota/xfs_dquot_item.c +++ b/fs/xfs/quota/xfs_dquot_item.c | |||
@@ -190,7 +190,7 @@ xfs_qm_dqunpin_wait( | |||
190 | /* | 190 | /* |
191 | * Give the log a push so we don't wait here too long. | 191 | * Give the log a push so we don't wait here too long. |
192 | */ | 192 | */ |
193 | xfs_log_force(dqp->q_mount, (xfs_lsn_t)0, XFS_LOG_FORCE); | 193 | xfs_log_force(dqp->q_mount, 0); |
194 | wait_event(dqp->q_pinwait, (atomic_read(&dqp->q_pincount) == 0)); | 194 | wait_event(dqp->q_pinwait, (atomic_read(&dqp->q_pincount) == 0)); |
195 | } | 195 | } |
196 | 196 | ||
@@ -245,10 +245,9 @@ xfs_qm_dquot_logitem_pushbuf( | |||
245 | qip->qli_pushbuf_flag = 0; | 245 | qip->qli_pushbuf_flag = 0; |
246 | xfs_dqunlock(dqp); | 246 | xfs_dqunlock(dqp); |
247 | 247 | ||
248 | if (XFS_BUF_ISPINNED(bp)) { | 248 | if (XFS_BUF_ISPINNED(bp)) |
249 | xfs_log_force(mp, (xfs_lsn_t)0, | 249 | xfs_log_force(mp, 0); |
250 | XFS_LOG_FORCE); | 250 | |
251 | } | ||
252 | if (dopush) { | 251 | if (dopush) { |
253 | int error; | 252 | int error; |
254 | #ifdef XFSRACEDEBUG | 253 | #ifdef XFSRACEDEBUG |
diff --git a/fs/xfs/quota/xfs_qm_syscalls.c b/fs/xfs/quota/xfs_qm_syscalls.c index 873e07e29074..5d0ee8d492db 100644 --- a/fs/xfs/quota/xfs_qm_syscalls.c +++ b/fs/xfs/quota/xfs_qm_syscalls.c | |||
@@ -1192,9 +1192,9 @@ xfs_qm_internalqcheck( | |||
1192 | if (! XFS_IS_QUOTA_ON(mp)) | 1192 | if (! XFS_IS_QUOTA_ON(mp)) |
1193 | return XFS_ERROR(ESRCH); | 1193 | return XFS_ERROR(ESRCH); |
1194 | 1194 | ||
1195 | xfs_log_force(mp, (xfs_lsn_t)0, XFS_LOG_FORCE | XFS_LOG_SYNC); | 1195 | xfs_log_force(mp, XFS_LOG_SYNC); |
1196 | XFS_bflush(mp->m_ddev_targp); | 1196 | XFS_bflush(mp->m_ddev_targp); |
1197 | xfs_log_force(mp, (xfs_lsn_t)0, XFS_LOG_FORCE | XFS_LOG_SYNC); | 1197 | xfs_log_force(mp, XFS_LOG_SYNC); |
1198 | XFS_bflush(mp->m_ddev_targp); | 1198 | XFS_bflush(mp->m_ddev_targp); |
1199 | 1199 | ||
1200 | mutex_lock(&qcheck_lock); | 1200 | mutex_lock(&qcheck_lock); |