diff options
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_sync.c')
-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); |