]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/xfs/linux-2.6/xfs_super.c
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
[karo-tx-linux.git] / fs / xfs / linux-2.6 / xfs_super.c
index c115dd5e95a8a01af86428e135ecabb8607229a6..a10f6416e56362b258d7104c911a78c95e6a0a47 100644 (file)
@@ -834,8 +834,11 @@ xfsaild_wakeup(
        struct xfs_ail          *ailp,
        xfs_lsn_t               threshold_lsn)
 {
-       ailp->xa_target = threshold_lsn;
-       wake_up_process(ailp->xa_task);
+       /* only ever move the target forwards */
+       if (XFS_LSN_CMP(threshold_lsn, ailp->xa_target) > 0) {
+               ailp->xa_target = threshold_lsn;
+               wake_up_process(ailp->xa_task);
+       }
 }
 
 STATIC int
@@ -847,8 +850,17 @@ xfsaild(
        long            tout = 0; /* milliseconds */
 
        while (!kthread_should_stop()) {
-               schedule_timeout_interruptible(tout ?
-                               msecs_to_jiffies(tout) : MAX_SCHEDULE_TIMEOUT);
+               /*
+                * for short sleeps indicating congestion, don't allow us to
+                * get woken early. Otherwise all we do is bang on the AIL lock
+                * without making progress.
+                */
+               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);
 
                /* swsusp */
                try_to_freeze();
@@ -1118,6 +1130,8 @@ xfs_fs_evict_inode(
         */
        ASSERT(!rwsem_is_locked(&ip->i_iolock.mr_lock));
        mrlock_init(&ip->i_iolock, MRLOCK_BARRIER, "xfsio", ip->i_ino);
+       lockdep_set_class_and_name(&ip->i_iolock.mr_lock,
+                       &xfs_iolock_reclaimable, "xfs_iolock_reclaimable");
 
        xfs_inactive(ip);
 }