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/linux-2.6 | |
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/linux-2.6')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_sync.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/fs/xfs/linux-2.6/xfs_sync.c b/fs/xfs/linux-2.6/xfs_sync.c index 58c24be72c65..c9b863eacab7 100644 --- a/fs/xfs/linux-2.6/xfs_sync.c +++ b/fs/xfs/linux-2.6/xfs_sync.c | |||
@@ -296,10 +296,7 @@ xfs_sync_data( | |||
296 | if (error) | 296 | if (error) |
297 | return XFS_ERROR(error); | 297 | return XFS_ERROR(error); |
298 | 298 | ||
299 | xfs_log_force(mp, 0, | 299 | xfs_log_force(mp, (flags & SYNC_WAIT) ? XFS_LOG_SYNC : 0); |
300 | (flags & SYNC_WAIT) ? | ||
301 | XFS_LOG_FORCE | XFS_LOG_SYNC : | ||
302 | XFS_LOG_FORCE); | ||
303 | return 0; | 300 | return 0; |
304 | } | 301 | } |
305 | 302 | ||
@@ -325,10 +322,6 @@ xfs_commit_dummy_trans( | |||
325 | struct xfs_inode *ip = mp->m_rootip; | 322 | struct xfs_inode *ip = mp->m_rootip; |
326 | struct xfs_trans *tp; | 323 | struct xfs_trans *tp; |
327 | int error; | 324 | int error; |
328 | int log_flags = XFS_LOG_FORCE; | ||
329 | |||
330 | if (flags & SYNC_WAIT) | ||
331 | log_flags |= XFS_LOG_SYNC; | ||
332 | 325 | ||
333 | /* | 326 | /* |
334 | * Put a dummy transaction in the log to tell recovery | 327 | * Put a dummy transaction in the log to tell recovery |
@@ -350,7 +343,7 @@ xfs_commit_dummy_trans( | |||
350 | xfs_iunlock(ip, XFS_ILOCK_EXCL); | 343 | xfs_iunlock(ip, XFS_ILOCK_EXCL); |
351 | 344 | ||
352 | /* the log force ensures this transaction is pushed to disk */ | 345 | /* the log force ensures this transaction is pushed to disk */ |
353 | xfs_log_force(mp, 0, log_flags); | 346 | xfs_log_force(mp, (flags & SYNC_WAIT) ? XFS_LOG_SYNC : 0); |
354 | return error; | 347 | return error; |
355 | } | 348 | } |
356 | 349 | ||
@@ -390,7 +383,7 @@ xfs_sync_fsdata( | |||
390 | * become pinned in between there and here. | 383 | * become pinned in between there and here. |
391 | */ | 384 | */ |
392 | if (XFS_BUF_ISPINNED(bp)) | 385 | if (XFS_BUF_ISPINNED(bp)) |
393 | xfs_log_force(mp, 0, XFS_LOG_FORCE); | 386 | xfs_log_force(mp, 0); |
394 | } | 387 | } |
395 | 388 | ||
396 | 389 | ||
@@ -575,7 +568,7 @@ xfs_flush_inodes( | |||
575 | igrab(inode); | 568 | igrab(inode); |
576 | xfs_syncd_queue_work(ip->i_mount, inode, xfs_flush_inodes_work, &completion); | 569 | xfs_syncd_queue_work(ip->i_mount, inode, xfs_flush_inodes_work, &completion); |
577 | wait_for_completion(&completion); | 570 | wait_for_completion(&completion); |
578 | xfs_log_force(ip->i_mount, (xfs_lsn_t)0, XFS_LOG_FORCE|XFS_LOG_SYNC); | 571 | xfs_log_force(ip->i_mount, XFS_LOG_SYNC); |
579 | } | 572 | } |
580 | 573 | ||
581 | /* | 574 | /* |
@@ -591,7 +584,7 @@ xfs_sync_worker( | |||
591 | int error; | 584 | int error; |
592 | 585 | ||
593 | if (!(mp->m_flags & XFS_MOUNT_RDONLY)) { | 586 | if (!(mp->m_flags & XFS_MOUNT_RDONLY)) { |
594 | xfs_log_force(mp, (xfs_lsn_t)0, XFS_LOG_FORCE); | 587 | xfs_log_force(mp, 0); |
595 | xfs_reclaim_inodes(mp, XFS_IFLUSH_DELWRI_ELSE_ASYNC); | 588 | xfs_reclaim_inodes(mp, XFS_IFLUSH_DELWRI_ELSE_ASYNC); |
596 | /* dgc: errors ignored here */ | 589 | /* dgc: errors ignored here */ |
597 | error = xfs_qm_sync(mp, SYNC_TRYLOCK); | 590 | error = xfs_qm_sync(mp, SYNC_TRYLOCK); |