aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/xfs/linux-2.6/xfs_sync.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/fs/xfs/linux-2.6/xfs_sync.c b/fs/xfs/linux-2.6/xfs_sync.c
index d4b7b21a6e56..3c31137cdc7f 100644
--- a/fs/xfs/linux-2.6/xfs_sync.c
+++ b/fs/xfs/linux-2.6/xfs_sync.c
@@ -526,6 +526,11 @@ xfs_flush_device(
526 xfs_log_force(ip->i_mount, (xfs_lsn_t)0, XFS_LOG_FORCE|XFS_LOG_SYNC); 526 xfs_log_force(ip->i_mount, (xfs_lsn_t)0, XFS_LOG_FORCE|XFS_LOG_SYNC);
527} 527}
528 528
529/*
530 * Every sync period we need to unpin all items, reclaim inodes, sync
531 * quota and write out the superblock. We might need to cover the log
532 * to indicate it is idle.
533 */
529STATIC void 534STATIC void
530xfs_sync_worker( 535xfs_sync_worker(
531 struct xfs_mount *mp, 536 struct xfs_mount *mp,
@@ -533,8 +538,15 @@ xfs_sync_worker(
533{ 538{
534 int error; 539 int error;
535 540
536 if (!(mp->m_flags & XFS_MOUNT_RDONLY)) 541 if (!(mp->m_flags & XFS_MOUNT_RDONLY)) {
537 error = xfs_sync(mp, SYNC_FSDATA | SYNC_BDFLUSH | SYNC_ATTR); 542 xfs_log_force(mp, (xfs_lsn_t)0, XFS_LOG_FORCE);
543 xfs_finish_reclaim_all(mp, 1, XFS_IFLUSH_DELWRI_ELSE_ASYNC);
544 /* dgc: errors ignored here */
545 error = XFS_QM_DQSYNC(mp, SYNC_BDFLUSH);
546 error = xfs_sync_fsdata(mp, SYNC_BDFLUSH);
547 if (xfs_log_need_covered(mp))
548 error = xfs_commit_dummy_trans(mp, XFS_LOG_FORCE);
549 }
538 mp->m_sync_seq++; 550 mp->m_sync_seq++;
539 wake_up(&mp->m_wait_single_sync_task); 551 wake_up(&mp->m_wait_single_sync_task);
540} 552}