]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/xfs/xfs_trans_ail.c
drivers: fix dma_get_required_mask
[linux-2.6-omap-h63xx.git] / fs / xfs / xfs_trans_ail.c
index 4d6330eddc8d32e60ddfc8228290d904665b7cf6..76d470d8a1e63b8ece4dc74ffb69881f057eeb13 100644 (file)
@@ -261,16 +261,19 @@ xfsaild_push(
                xfs_log_force(mp, (xfs_lsn_t)0, XFS_LOG_FORCE);
        }
 
-       /*
-        * We reached the target so wait a bit longer for I/O to complete and
-        * remove pushed items from the AIL before we start the next scan from
-        * the start of the AIL.
-        */
-       if ((XFS_LSN_CMP(lsn, target) >= 0)) {
+       if (!count) {
+               /* We're past our target or empty, so idle */
+               tout = 1000;
+       } else if (XFS_LSN_CMP(lsn, target) >= 0) {
+               /*
+                * We reached the target so wait a bit longer for I/O to
+                * complete and remove pushed items from the AIL before we
+                * start the next scan from the start of the AIL.
+                */
                tout += 20;
                last_pushed_lsn = 0;
        } else if ((restarts > XFS_TRANS_PUSH_AIL_RESTARTS) ||
-                  (count && ((stuck * 100) / count > 90))) {
+                  ((stuck * 100) / count > 90)) {
                /*
                 * Either there is a lot of contention on the AIL or we
                 * are stuck due to operations in progress. "Stuck" in this