Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 250067
b: refs/heads/master
c: e4d3c4a
h: refs/heads/master
i:
  250065: f1091b0
  250063: 31c6307
v: v3
  • Loading branch information
Dave Chinner authored and Alex Elder committed May 9, 2011
1 parent 8eeed79 commit 79c8c5c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 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: fd5670f22fce247754243cf2ed41941e5762d990
refs/heads/master: e4d3c4a43b595d5124ae824d300626e6489ae857
16 changes: 10 additions & 6 deletions trunk/fs/xfs/xfs_trans_ail.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,15 +487,19 @@ xfs_ail_worker(
ailp->xa_last_pushed_lsn = 0;

/*
* Check for an updated push target before clearing the
* XFS_AIL_PUSHING_BIT. If the target changed, we've got more
* work to do. Wait a bit longer before starting that work.
* We clear the XFS_AIL_PUSHING_BIT first before checking
* whether the target has changed. If the target has changed,
* this pushes the requeue race directly onto the result of the
* atomic test/set bit, so we are guaranteed that either the
* the pusher that changed the target or ourselves will requeue
* the work (but not both).
*/
clear_bit(XFS_AIL_PUSHING_BIT, &ailp->xa_flags);
smp_rmb();
if (XFS_LSN_CMP(ailp->xa_target, target) == 0) {
clear_bit(XFS_AIL_PUSHING_BIT, &ailp->xa_flags);
if (XFS_LSN_CMP(ailp->xa_target, target) == 0 ||
test_and_set_bit(XFS_AIL_PUSHING_BIT, &ailp->xa_flags))
return;
}

tout = 50;
} else if (XFS_LSN_CMP(lsn, target) >= 0) {
/*
Expand Down

0 comments on commit 79c8c5c

Please sign in to comment.