diff options
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_super.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_super.c | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index 064f964d4f3c..9731898083ae 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c | |||
@@ -606,7 +606,8 @@ xfs_blkdev_get( | |||
606 | { | 606 | { |
607 | int error = 0; | 607 | int error = 0; |
608 | 608 | ||
609 | *bdevp = open_bdev_exclusive(name, FMODE_READ|FMODE_WRITE, mp); | 609 | *bdevp = blkdev_get_by_path(name, FMODE_READ|FMODE_WRITE|FMODE_EXCL, |
610 | mp); | ||
610 | if (IS_ERR(*bdevp)) { | 611 | if (IS_ERR(*bdevp)) { |
611 | error = PTR_ERR(*bdevp); | 612 | error = PTR_ERR(*bdevp); |
612 | printk("XFS: Invalid device [%s], error=%d\n", name, error); | 613 | printk("XFS: Invalid device [%s], error=%d\n", name, error); |
@@ -620,7 +621,7 @@ xfs_blkdev_put( | |||
620 | struct block_device *bdev) | 621 | struct block_device *bdev) |
621 | { | 622 | { |
622 | if (bdev) | 623 | if (bdev) |
623 | close_bdev_exclusive(bdev, FMODE_READ|FMODE_WRITE); | 624 | blkdev_put(bdev, FMODE_READ|FMODE_WRITE|FMODE_EXCL); |
624 | } | 625 | } |
625 | 626 | ||
626 | /* | 627 | /* |
@@ -834,8 +835,11 @@ xfsaild_wakeup( | |||
834 | struct xfs_ail *ailp, | 835 | struct xfs_ail *ailp, |
835 | xfs_lsn_t threshold_lsn) | 836 | xfs_lsn_t threshold_lsn) |
836 | { | 837 | { |
837 | ailp->xa_target = threshold_lsn; | 838 | /* only ever move the target forwards */ |
838 | wake_up_process(ailp->xa_task); | 839 | if (XFS_LSN_CMP(threshold_lsn, ailp->xa_target) > 0) { |
840 | ailp->xa_target = threshold_lsn; | ||
841 | wake_up_process(ailp->xa_task); | ||
842 | } | ||
839 | } | 843 | } |
840 | 844 | ||
841 | STATIC int | 845 | STATIC int |
@@ -847,8 +851,17 @@ xfsaild( | |||
847 | long tout = 0; /* milliseconds */ | 851 | long tout = 0; /* milliseconds */ |
848 | 852 | ||
849 | while (!kthread_should_stop()) { | 853 | while (!kthread_should_stop()) { |
850 | schedule_timeout_interruptible(tout ? | 854 | /* |
851 | msecs_to_jiffies(tout) : MAX_SCHEDULE_TIMEOUT); | 855 | * for short sleeps indicating congestion, don't allow us to |
856 | * get woken early. Otherwise all we do is bang on the AIL lock | ||
857 | * without making progress. | ||
858 | */ | ||
859 | if (tout && tout <= 20) | ||
860 | __set_current_state(TASK_KILLABLE); | ||
861 | else | ||
862 | __set_current_state(TASK_INTERRUPTIBLE); | ||
863 | schedule_timeout(tout ? | ||
864 | msecs_to_jiffies(tout) : MAX_SCHEDULE_TIMEOUT); | ||
852 | 865 | ||
853 | /* swsusp */ | 866 | /* swsusp */ |
854 | try_to_freeze(); | 867 | try_to_freeze(); |
@@ -935,7 +948,7 @@ out_reclaim: | |||
935 | * Slab object creation initialisation for the XFS inode. | 948 | * Slab object creation initialisation for the XFS inode. |
936 | * This covers only the idempotent fields in the XFS inode; | 949 | * This covers only the idempotent fields in the XFS inode; |
937 | * all other fields need to be initialised on allocation | 950 | * all other fields need to be initialised on allocation |
938 | * from the slab. This avoids the need to repeatedly intialise | 951 | * from the slab. This avoids the need to repeatedly initialise |
939 | * fields in the xfs inode that left in the initialise state | 952 | * fields in the xfs inode that left in the initialise state |
940 | * when freeing the inode. | 953 | * when freeing the inode. |
941 | */ | 954 | */ |
@@ -1118,6 +1131,8 @@ xfs_fs_evict_inode( | |||
1118 | */ | 1131 | */ |
1119 | ASSERT(!rwsem_is_locked(&ip->i_iolock.mr_lock)); | 1132 | ASSERT(!rwsem_is_locked(&ip->i_iolock.mr_lock)); |
1120 | mrlock_init(&ip->i_iolock, MRLOCK_BARRIER, "xfsio", ip->i_ino); | 1133 | mrlock_init(&ip->i_iolock, MRLOCK_BARRIER, "xfsio", ip->i_ino); |
1134 | lockdep_set_class_and_name(&ip->i_iolock.mr_lock, | ||
1135 | &xfs_iolock_reclaimable, "xfs_iolock_reclaimable"); | ||
1121 | 1136 | ||
1122 | xfs_inactive(ip); | 1137 | xfs_inactive(ip); |
1123 | } | 1138 | } |
@@ -1399,7 +1414,7 @@ xfs_fs_freeze( | |||
1399 | 1414 | ||
1400 | xfs_save_resvblks(mp); | 1415 | xfs_save_resvblks(mp); |
1401 | xfs_quiesce_attr(mp); | 1416 | xfs_quiesce_attr(mp); |
1402 | return -xfs_fs_log_dummy(mp, SYNC_WAIT); | 1417 | return -xfs_fs_log_dummy(mp); |
1403 | } | 1418 | } |
1404 | 1419 | ||
1405 | STATIC int | 1420 | STATIC int |