diff options
author | Andrew Morton <akpm@osdl.org> | 2006-08-31 12:56:06 +0200 |
---|---|---|
committer | Jens Axboe <axboe@nelson.home.kernel.dk> | 2006-09-30 20:52:33 +0200 |
commit | bcfd8d36151e531e1c6c731f1fbf792509a1c494 (patch) | |
tree | 6c8dec2cffc8310ecc09207aef9c2027a1c89003 /include/linux/blkdev.h | |
parent | 5e6d12b2c8be2cac099df6dcb8b26884f24d2621 (diff) |
[PATCH] CONFIG_BLOCK: blk_congestion_wait() fix
Don't just do nothing: it'll cause busywaits all over writeback and page
reclaim.
For now, take a fixed-length nap. Will improve when NFS starts waking up
throttled processes.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r-- | include/linux/blkdev.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 3e36107d342a..1d79b8d4ca6d 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -1,6 +1,7 @@ #ifndef _LINUX_BLKDEV_H #define _LINUX_BLKDEV_H +#include <linux/sched.h> #include <linux/major.h> #include <linux/genhd.h> #include <linux/list.h> @@ -848,7 +849,7 @@ void kblockd_flush(void); static inline long blk_congestion_wait(int rw, long timeout) { - return timeout; + return io_schedule_timeout(timeout); } static inline long nr_blockdev_pages(void) @@ -856,7 +857,9 @@ static inline long nr_blockdev_pages(void) return 0; } -static inline void exit_io_context(void) {} +static inline void exit_io_context(void) +{ +} #endif /* CONFIG_BLOCK */ |