Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124849
b: refs/heads/master
c: 8c38ab0
h: refs/heads/master
i:
  124847: c4cfa38
v: v3
  • Loading branch information
David Chinner authored and Lachlan McIlroy committed Oct 30, 2008
1 parent 61e514b commit 9fc184a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 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: 116545130cbc5214523c2f994a11c81ef9eb9186
refs/heads/master: 8c38ab032094ff1d903c79db689607b1ebae13ca
26 changes: 22 additions & 4 deletions trunk/fs/xfs/linux-2.6/xfs_sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ xfs_sync_inodes_ag(
{
xfs_perag_t *pag = &mp->m_perag[ag];
int nr_found;
int first_index = 0;
uint32_t first_index = 0;
int error = 0;
int last_error = 0;
int fflag = XFS_B_ASYNC;
Expand Down Expand Up @@ -97,8 +97,17 @@ xfs_sync_inodes_ag(
break;
}

/* update the index for the next lookup */
/*
* Update the index for the next lookup. Catch overflows
* into the next AG range which can occur if we have inodes
* in the last block of the AG and we are currently
* pointing to the last inode.
*/
first_index = XFS_INO_TO_AGINO(mp, ip->i_ino + 1);
if (first_index < XFS_INO_TO_AGINO(mp, ip->i_ino)) {
read_unlock(&pag->pag_ici_lock);
break;
}

/*
* skip inodes in reclaim. Let xfs_syncsub do that for
Expand Down Expand Up @@ -702,7 +711,7 @@ xfs_reclaim_inodes_ag(
xfs_inode_t *ip = NULL;
xfs_perag_t *pag = &mp->m_perag[ag];
int nr_found;
int first_index;
uint32_t first_index;
int skipped;

restart:
Expand All @@ -724,8 +733,17 @@ xfs_reclaim_inodes_ag(
break;
}

/* update the index for the next lookup */
/*
* Update the index for the next lookup. Catch overflows
* into the next AG range which can occur if we have inodes
* in the last block of the AG and we are currently
* pointing to the last inode.
*/
first_index = XFS_INO_TO_AGINO(mp, ip->i_ino + 1);
if (first_index < XFS_INO_TO_AGINO(mp, ip->i_ino)) {
read_unlock(&pag->pag_ici_lock);
break;
}

ASSERT(xfs_iflags_test(ip, (XFS_IRECLAIMABLE|XFS_IRECLAIM)));

Expand Down

0 comments on commit 9fc184a

Please sign in to comment.