diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2010-06-01 05:05:22 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2010-06-01 05:05:22 -0400 |
commit | f17625b318d9b151e7bd41e31223e9d89b2aaa77 (patch) | |
tree | 6b4f04ff35d9bfcc73fc4d3f08120347b0ab4706 /fs/fs-writeback.c | |
parent | 0ae0b5d0557264bad65e22f1e2da4b83a02c4535 (diff) |
Revert "writeback: ensure that WB_SYNC_NONE writeback with sb pinned is sync"
This reverts commit 7c8a3554c683f512dbcee26faedb42e4c05f12fa.
We are investigating a hang associated with the WB_SYNC_NONE changes,
so revert them for now.
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'fs/fs-writeback.c')
-rw-r--r-- | fs/fs-writeback.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 5c4161f1fd9a..6753912641b4 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c | |||
@@ -193,8 +193,7 @@ static void bdi_wait_on_work_clear(struct bdi_work *work) | |||
193 | } | 193 | } |
194 | 194 | ||
195 | static void bdi_alloc_queue_work(struct backing_dev_info *bdi, | 195 | static void bdi_alloc_queue_work(struct backing_dev_info *bdi, |
196 | struct wb_writeback_args *args, | 196 | struct wb_writeback_args *args) |
197 | int wait) | ||
198 | { | 197 | { |
199 | struct bdi_work *work; | 198 | struct bdi_work *work; |
200 | 199 | ||
@@ -206,8 +205,6 @@ static void bdi_alloc_queue_work(struct backing_dev_info *bdi, | |||
206 | if (work) { | 205 | if (work) { |
207 | bdi_work_init(work, args); | 206 | bdi_work_init(work, args); |
208 | bdi_queue_work(bdi, work); | 207 | bdi_queue_work(bdi, work); |
209 | if (wait) | ||
210 | bdi_wait_on_work_clear(work); | ||
211 | } else { | 208 | } else { |
212 | struct bdi_writeback *wb = &bdi->wb; | 209 | struct bdi_writeback *wb = &bdi->wb; |
213 | 210 | ||
@@ -282,7 +279,7 @@ void bdi_start_writeback(struct backing_dev_info *bdi, struct super_block *sb, | |||
282 | args.for_background = 1; | 279 | args.for_background = 1; |
283 | } | 280 | } |
284 | 281 | ||
285 | bdi_alloc_queue_work(bdi, &args, sb_locked); | 282 | bdi_alloc_queue_work(bdi, &args); |
286 | } | 283 | } |
287 | 284 | ||
288 | /* | 285 | /* |
@@ -912,7 +909,6 @@ long wb_do_writeback(struct bdi_writeback *wb, int force_wait) | |||
912 | 909 | ||
913 | while ((work = get_next_work_item(bdi, wb)) != NULL) { | 910 | while ((work = get_next_work_item(bdi, wb)) != NULL) { |
914 | struct wb_writeback_args args = work->args; | 911 | struct wb_writeback_args args = work->args; |
915 | int post_clear; | ||
916 | 912 | ||
917 | /* | 913 | /* |
918 | * Override sync mode, in case we must wait for completion | 914 | * Override sync mode, in case we must wait for completion |
@@ -920,13 +916,11 @@ long wb_do_writeback(struct bdi_writeback *wb, int force_wait) | |||
920 | if (force_wait) | 916 | if (force_wait) |
921 | work->args.sync_mode = args.sync_mode = WB_SYNC_ALL; | 917 | work->args.sync_mode = args.sync_mode = WB_SYNC_ALL; |
922 | 918 | ||
923 | post_clear = WB_SYNC_ALL || args.sb_pinned; | ||
924 | |||
925 | /* | 919 | /* |
926 | * If this isn't a data integrity operation, just notify | 920 | * If this isn't a data integrity operation, just notify |
927 | * that we have seen this work and we are now starting it. | 921 | * that we have seen this work and we are now starting it. |
928 | */ | 922 | */ |
929 | if (!post_clear) | 923 | if (args.sync_mode == WB_SYNC_NONE) |
930 | wb_clear_pending(wb, work); | 924 | wb_clear_pending(wb, work); |
931 | 925 | ||
932 | wrote += wb_writeback(wb, &args); | 926 | wrote += wb_writeback(wb, &args); |
@@ -935,7 +929,7 @@ long wb_do_writeback(struct bdi_writeback *wb, int force_wait) | |||
935 | * This is a data integrity writeback, so only do the | 929 | * This is a data integrity writeback, so only do the |
936 | * notification when we have completed the work. | 930 | * notification when we have completed the work. |
937 | */ | 931 | */ |
938 | if (post_clear) | 932 | if (args.sync_mode == WB_SYNC_ALL) |
939 | wb_clear_pending(wb, work); | 933 | wb_clear_pending(wb, work); |
940 | } | 934 | } |
941 | 935 | ||
@@ -1011,7 +1005,7 @@ static void bdi_writeback_all(struct super_block *sb, long nr_pages) | |||
1011 | if (!bdi_has_dirty_io(bdi)) | 1005 | if (!bdi_has_dirty_io(bdi)) |
1012 | continue; | 1006 | continue; |
1013 | 1007 | ||
1014 | bdi_alloc_queue_work(bdi, &args, 0); | 1008 | bdi_alloc_queue_work(bdi, &args); |
1015 | } | 1009 | } |
1016 | 1010 | ||
1017 | rcu_read_unlock(); | 1011 | rcu_read_unlock(); |