Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
authorAlex Elder <aelder@sgi.com>
Mon, 17 Oct 2011 20:42:02 +0000 (15:42 -0500)
committerAlex Elder <aelder@sgi.com>
Mon, 17 Oct 2011 20:42:02 +0000 (15:42 -0500)
Resolved conflicts:
  fs/xfs/xfs_trans_priv.h:
    - deleted struct xfs_ail field xa_flags
    - kept field xa_log_flush in struct xfs_ail
  fs/xfs/xfs_trans_ail.c:
    - in xfsaild_push(), in XFS_ITEM_PUSHBUF case, replaced
      "flush_log = 1" with "ailp->xa_log_flush++"

Signed-off-by: Alex Elder <aelder@sgi.com>
1  2 
fs/xfs/xfs_buf_item.c
fs/xfs/xfs_inode_item.c
fs/xfs/xfs_super.c
fs/xfs/xfs_trans.h
fs/xfs/xfs_trans_ail.c
fs/xfs/xfs_trans_priv.h

Simple merge
Simple merge
Simple merge
Simple merge
index 9df7f9f1b5ee7d4bf51ed09c5c029da739800b0c,3a1e7ca54c2dc75d73b59c89ca30af4138c40d33..512ff646d01c979083ce0a577a65d0b23a5af50b
@@@ -502,22 -496,7 +498,8 @@@ out_done
        if (!count) {
                /* We're past our target or empty, so idle */
                ailp->xa_last_pushed_lsn = 0;
 +              ailp->xa_log_flush = 0;
  
-               /*
-                * 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 ||
-                   test_and_set_bit(XFS_AIL_PUSHING_BIT, &ailp->xa_flags))
-                       return;
                tout = 50;
        } else if (XFS_LSN_CMP(lsn, target) >= 0) {
                /*
                 * were stuck.
                 *
                 * Backoff a bit more to allow some I/O to complete before
 -               * continuing from where we were.
 +               * restarting from the start of the AIL. This prevents us
 +               * from spinning on the same items, and if they are pinned will
 +               * all the restart to issue a log force to unpin the stuck
 +               * items.
                 */
                tout = 20;
 +              ailp->xa_last_pushed_lsn = 0;
        }
  
-       /* There is more to do, requeue us.  */
-       queue_delayed_work(xfs_syncd_wq, &ailp->xa_work,
-                                       msecs_to_jiffies(tout));
+       return tout;
+ }
+ static int
+ xfsaild(
+       void            *data)
+ {
+       struct xfs_ail  *ailp = data;
+       long            tout = 0;       /* milliseconds */
+       while (!kthread_should_stop()) {
+               if (tout && tout <= 20)
+                       __set_current_state(TASK_KILLABLE);
+               else
+                       __set_current_state(TASK_INTERRUPTIBLE);
+               schedule_timeout(tout ?
+                                msecs_to_jiffies(tout) : MAX_SCHEDULE_TIMEOUT);
+               try_to_freeze();
+               tout = xfsaild_push(ailp);
+       }
+       return 0;
  }
  
  /*
index 0a6eec6d472a83f97a96ca77889c69b22121cb35,22750b5e4a8f06e41b6d4074024b2847f6d0465d..44820b9fcb4327f9d7d3b14b626e67f19bb18973
@@@ -68,14 -69,9 +69,10 @@@ struct xfs_ail 
        xfs_lsn_t               xa_target;
        struct list_head        xa_cursors;
        spinlock_t              xa_lock;
-       struct delayed_work     xa_work;
        xfs_lsn_t               xa_last_pushed_lsn;
-       unsigned long           xa_flags;
 +      int                     xa_log_flush;
  };
  
- #define XFS_AIL_PUSHING_BIT   0
  /*
   * From xfs_trans_ail.c
   */