diff options
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_buf.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_buf.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index 5cb230f2cb4f..c05324d3282c 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c | |||
@@ -990,7 +990,7 @@ xfs_buf_lock( | |||
990 | if (atomic_read(&bp->b_pin_count) && (bp->b_flags & XBF_STALE)) | 990 | if (atomic_read(&bp->b_pin_count) && (bp->b_flags & XBF_STALE)) |
991 | xfs_log_force(bp->b_target->bt_mount, 0); | 991 | xfs_log_force(bp->b_target->bt_mount, 0); |
992 | if (atomic_read(&bp->b_io_remaining)) | 992 | if (atomic_read(&bp->b_io_remaining)) |
993 | blk_run_address_space(bp->b_target->bt_mapping); | 993 | blk_flush_plug(current); |
994 | down(&bp->b_sema); | 994 | down(&bp->b_sema); |
995 | XB_SET_OWNER(bp); | 995 | XB_SET_OWNER(bp); |
996 | 996 | ||
@@ -1034,9 +1034,7 @@ xfs_buf_wait_unpin( | |||
1034 | set_current_state(TASK_UNINTERRUPTIBLE); | 1034 | set_current_state(TASK_UNINTERRUPTIBLE); |
1035 | if (atomic_read(&bp->b_pin_count) == 0) | 1035 | if (atomic_read(&bp->b_pin_count) == 0) |
1036 | break; | 1036 | break; |
1037 | if (atomic_read(&bp->b_io_remaining)) | 1037 | io_schedule(); |
1038 | blk_run_address_space(bp->b_target->bt_mapping); | ||
1039 | schedule(); | ||
1040 | } | 1038 | } |
1041 | remove_wait_queue(&bp->b_waiters, &wait); | 1039 | remove_wait_queue(&bp->b_waiters, &wait); |
1042 | set_current_state(TASK_RUNNING); | 1040 | set_current_state(TASK_RUNNING); |
@@ -1442,7 +1440,7 @@ xfs_buf_iowait( | |||
1442 | trace_xfs_buf_iowait(bp, _RET_IP_); | 1440 | trace_xfs_buf_iowait(bp, _RET_IP_); |
1443 | 1441 | ||
1444 | if (atomic_read(&bp->b_io_remaining)) | 1442 | if (atomic_read(&bp->b_io_remaining)) |
1445 | blk_run_address_space(bp->b_target->bt_mapping); | 1443 | blk_flush_plug(current); |
1446 | wait_for_completion(&bp->b_iowait); | 1444 | wait_for_completion(&bp->b_iowait); |
1447 | 1445 | ||
1448 | trace_xfs_buf_iowait_done(bp, _RET_IP_); | 1446 | trace_xfs_buf_iowait_done(bp, _RET_IP_); |
@@ -1666,7 +1664,6 @@ xfs_mapping_buftarg( | |||
1666 | struct inode *inode; | 1664 | struct inode *inode; |
1667 | struct address_space *mapping; | 1665 | struct address_space *mapping; |
1668 | static const struct address_space_operations mapping_aops = { | 1666 | static const struct address_space_operations mapping_aops = { |
1669 | .sync_page = block_sync_page, | ||
1670 | .migratepage = fail_migrate_page, | 1667 | .migratepage = fail_migrate_page, |
1671 | }; | 1668 | }; |
1672 | 1669 | ||
@@ -1947,7 +1944,7 @@ xfsbufd( | |||
1947 | count++; | 1944 | count++; |
1948 | } | 1945 | } |
1949 | if (count) | 1946 | if (count) |
1950 | blk_run_address_space(target->bt_mapping); | 1947 | blk_flush_plug(current); |
1951 | 1948 | ||
1952 | } while (!kthread_should_stop()); | 1949 | } while (!kthread_should_stop()); |
1953 | 1950 | ||
@@ -1995,7 +1992,7 @@ xfs_flush_buftarg( | |||
1995 | 1992 | ||
1996 | if (wait) { | 1993 | if (wait) { |
1997 | /* Expedite and wait for IO to complete. */ | 1994 | /* Expedite and wait for IO to complete. */ |
1998 | blk_run_address_space(target->bt_mapping); | 1995 | blk_flush_plug(current); |
1999 | while (!list_empty(&wait_list)) { | 1996 | while (!list_empty(&wait_list)) { |
2000 | bp = list_first_entry(&wait_list, struct xfs_buf, b_list); | 1997 | bp = list_first_entry(&wait_list, struct xfs_buf, b_list); |
2001 | 1998 | ||