Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124830
b: refs/heads/master
c: aacaa88
h: refs/heads/master
v: v3
  • Loading branch information
David Chinner authored and Lachlan McIlroy committed Oct 30, 2008
1 parent f24f94d commit 50f6453
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dfd837a9eb79de4e50323a6f4e1ad8138d806cb7
refs/heads/master: aacaa880bfac8fecd44b279a49688643890358f5
16 changes: 14 additions & 2 deletions trunk/fs/xfs/linux-2.6/xfs_sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -526,15 +526,27 @@ xfs_flush_device(
xfs_log_force(ip->i_mount, (xfs_lsn_t)0, XFS_LOG_FORCE|XFS_LOG_SYNC);
}

/*
* Every sync period we need to unpin all items, reclaim inodes, sync
* quota and write out the superblock. We might need to cover the log
* to indicate it is idle.
*/
STATIC void
xfs_sync_worker(
struct xfs_mount *mp,
void *unused)
{
int error;

if (!(mp->m_flags & XFS_MOUNT_RDONLY))
error = xfs_sync(mp, SYNC_FSDATA | SYNC_BDFLUSH | SYNC_ATTR);
if (!(mp->m_flags & XFS_MOUNT_RDONLY)) {
xfs_log_force(mp, (xfs_lsn_t)0, XFS_LOG_FORCE);
xfs_finish_reclaim_all(mp, 1, XFS_IFLUSH_DELWRI_ELSE_ASYNC);
/* dgc: errors ignored here */
error = XFS_QM_DQSYNC(mp, SYNC_BDFLUSH);
error = xfs_sync_fsdata(mp, SYNC_BDFLUSH);
if (xfs_log_need_covered(mp))
error = xfs_commit_dummy_trans(mp, XFS_LOG_FORCE);
}
mp->m_sync_seq++;
wake_up(&mp->m_wait_single_sync_task);
}
Expand Down

0 comments on commit 50f6453

Please sign in to comment.