Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 148843
b: refs/heads/master
c: abc1064
h: refs/heads/master
i:
  148841: 39ff76c
  148839: b4868ae
v: v3
  • Loading branch information
Dave Chinner authored and Christoph Hellwig committed Jun 8, 2009
1 parent 488a66e commit a9cbded
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 21 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: 1da8eecab5f866b4f5be43adbaadf18e259a8cc5
refs/heads/master: abc1064742604e60a47a65fa3214dc1a84db093d
22 changes: 4 additions & 18 deletions trunk/fs/xfs/linux-2.6/xfs_sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ xfs_quiesce_fs(
int count = 0, pincount;

xfs_flush_buftarg(mp->m_ddev_targp, 0);
xfs_reclaim_inodes(mp, 0, XFS_IFLUSH_DELWRI_ELSE_ASYNC);
xfs_reclaim_inodes(mp, XFS_IFLUSH_DELWRI_ELSE_ASYNC);

/*
* This loop must run at least twice. The first instance of the loop
Expand Down Expand Up @@ -509,7 +509,7 @@ xfs_sync_worker(

if (!(mp->m_flags & XFS_MOUNT_RDONLY)) {
xfs_log_force(mp, (xfs_lsn_t)0, XFS_LOG_FORCE);
xfs_reclaim_inodes(mp, 0, XFS_IFLUSH_DELWRI_ELSE_ASYNC);
xfs_reclaim_inodes(mp, XFS_IFLUSH_DELWRI_ELSE_ASYNC);
/* dgc: errors ignored here */
error = xfs_qm_sync(mp, SYNC_BDFLUSH);
error = xfs_sync_fsdata(mp, SYNC_BDFLUSH);
Expand Down Expand Up @@ -703,7 +703,6 @@ STATIC void
xfs_reclaim_inodes_ag(
xfs_mount_t *mp,
int ag,
int noblock,
int mode)
{
xfs_inode_t *ip = NULL;
Expand Down Expand Up @@ -749,25 +748,13 @@ xfs_reclaim_inodes_ag(
continue;
}

if (noblock) {
if (!xfs_ilock_nowait(ip, XFS_ILOCK_EXCL)) {
read_unlock(&pag->pag_ici_lock);
continue;
}
if (xfs_ipincount(ip) ||
!xfs_iflock_nowait(ip)) {
xfs_iunlock(ip, XFS_ILOCK_EXCL);
read_unlock(&pag->pag_ici_lock);
continue;
}
}
read_unlock(&pag->pag_ici_lock);

/*
* hmmm - this is an inode already in reclaim. Do
* we even bother catching it here?
*/
if (xfs_reclaim_inode(ip, noblock, mode))
if (xfs_reclaim_inode(ip, 0, mode))
skipped++;
} while (nr_found);

Expand All @@ -782,15 +769,14 @@ xfs_reclaim_inodes_ag(
int
xfs_reclaim_inodes(
xfs_mount_t *mp,
int noblock,
int mode)
{
int i;

for (i = 0; i < mp->m_sb.sb_agcount; i++) {
if (!mp->m_perag[i].pag_ici_init)
continue;
xfs_reclaim_inodes_ag(mp, i, noblock, mode);
xfs_reclaim_inodes_ag(mp, i, mode);
}
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/xfs/linux-2.6/xfs_sync.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void xfs_quiesce_attr(struct xfs_mount *mp);
void xfs_flush_inodes(struct xfs_inode *ip);

int xfs_reclaim_inode(struct xfs_inode *ip, int locked, int sync_mode);
int xfs_reclaim_inodes(struct xfs_mount *mp, int noblock, int mode);
int xfs_reclaim_inodes(struct xfs_mount *mp, int mode);

void xfs_inode_set_reclaim_tag(struct xfs_inode *ip);
void xfs_inode_clear_reclaim_tag(struct xfs_inode *ip);
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/xfs/xfs_mount.c
Original file line number Diff line number Diff line change
Expand Up @@ -1371,7 +1371,7 @@ xfs_unmountfs(
* need to force the log first.
*/
xfs_log_force(mp, (xfs_lsn_t)0, XFS_LOG_FORCE | XFS_LOG_SYNC);
xfs_reclaim_inodes(mp, 0, XFS_IFLUSH_ASYNC);
xfs_reclaim_inodes(mp, XFS_IFLUSH_ASYNC);

xfs_qm_unmount(mp);

Expand Down

0 comments on commit a9cbded

Please sign in to comment.