diff options
author | Tejun Heo <tj@kernel.org> | 2009-05-07 22:54:06 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-05-11 03:52:16 -0400 |
commit | b12d4f82c1a3cdcb2441c803a3368a9426f2f47f (patch) | |
tree | 043c804960c3192076737411c1a6854f2b49ded9 /drivers/block/paride/pd.c | |
parent | 2d75ce084eec2a8154225c7e978191b364029003 (diff) |
paride: dequeue in-flight request
pd/pf/pcd have track in-flight request by pd/pf/pcd_req. They can be
converted to dequeueing model by updating fetching and completion
paths. Convert them.
Note that removal of elv_next_request() call from pf_next_buf()
doesn't make any functional difference. The path is traveled only
during partial completion of a request and elv_next_request() call
must return the same request anyway.
[ Impact: dequeue in-flight request ]
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Tim Waugh <tim@cyberelk.net>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/block/paride/pd.c')
-rw-r--r-- | drivers/block/paride/pd.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c index 9ec5d4ac0b64..d2ca3f552061 100644 --- a/drivers/block/paride/pd.c +++ b/drivers/block/paride/pd.c | |||
@@ -410,11 +410,14 @@ static void run_fsm(void) | |||
410 | pd_claimed = 0; | 410 | pd_claimed = 0; |
411 | phase = NULL; | 411 | phase = NULL; |
412 | spin_lock_irqsave(&pd_lock, saved_flags); | 412 | spin_lock_irqsave(&pd_lock, saved_flags); |
413 | __blk_end_request_cur(pd_req, | 413 | if (!__blk_end_request_cur(pd_req, |
414 | res == Ok ? 0 : -EIO); | 414 | res == Ok ? 0 : -EIO)) { |
415 | pd_req = elv_next_request(pd_queue); | 415 | pd_req = elv_next_request(pd_queue); |
416 | if (!pd_req) | 416 | if (!pd_req) |
417 | stop = 1; | 417 | stop = 1; |
418 | else | ||
419 | blkdev_dequeue_request(pd_req); | ||
420 | } | ||
418 | spin_unlock_irqrestore(&pd_lock, saved_flags); | 421 | spin_unlock_irqrestore(&pd_lock, saved_flags); |
419 | if (stop) | 422 | if (stop) |
420 | return; | 423 | return; |
@@ -706,6 +709,7 @@ static void do_pd_request(struct request_queue * q) | |||
706 | pd_req = elv_next_request(q); | 709 | pd_req = elv_next_request(q); |
707 | if (!pd_req) | 710 | if (!pd_req) |
708 | return; | 711 | return; |
712 | blkdev_dequeue_request(pd_req); | ||
709 | 713 | ||
710 | schedule_fsm(); | 714 | schedule_fsm(); |
711 | } | 715 | } |