diff options
| author | Tejun Heo <[email protected]> | 2011-03-02 13:48:06 +0000 |
|---|---|---|
| committer | Jens Axboe <[email protected]> | 2011-03-02 13:48:06 +0000 |
| commit | 255bb490c8c27eed484d538efe6ef6a7473bd3f6 (patch) | |
| tree | 630289b9de253a1f0575f29d2de019494016ff79 /net/unix/af_unix.c | |
| parent | block: add @force_kblockd to __blk_run_queue() (diff) | |
| download | kernel-255bb490c8c27eed484d538efe6ef6a7473bd3f6.tar.gz kernel-255bb490c8c27eed484d538efe6ef6a7473bd3f6.zip | |
block: blk-flush shouldn't call directly into q->request_fn() __blk_run_queue()
blk-flush decomposes a flush into sequence of multiple requests. On
completion of a request, the next one is queued; however, block layer
must not implicitly call into q->request_fn() directly from completion
path. This makes the queue behave unexpectedly when seen from the
drivers and violates the assumption that q->request_fn() is called
with process context + queue_lock.
This patch makes blk-flush the following two changes to make sure
q->request_fn() is not called directly from request completion path.
- blk_flush_complete_seq_end_io() now asks __blk_run_queue() to always
use kblockd instead of calling directly into q->request_fn().
- queue_next_fseq() uses ELEVATOR_INSERT_REQUEUE instead of
ELEVATOR_INSERT_FRONT so that elv_insert() doesn't try to unplug the
request queue directly.
Reported by Jan in the following threads.
http://thread.gmane.org/gmane.linux.ide/48778
http://thread.gmane.org/gmane.linux.ide/48786
stable: applicable to v2.6.37.
Signed-off-by: Tejun Heo <[email protected]>
Reported-by: Jan Beulich <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: [email protected]
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions
