aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/paride/pf.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-05-07 22:54:06 -0400
committerJens Axboe <jens.axboe@oracle.com>2009-05-11 03:52:16 -0400
commitb12d4f82c1a3cdcb2441c803a3368a9426f2f47f (patch)
tree043c804960c3192076737411c1a6854f2b49ded9 /drivers/block/paride/pf.c
parent2d75ce084eec2a8154225c7e978191b364029003 (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/pf.c')
-rw-r--r--drivers/block/paride/pf.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/block/paride/pf.c b/drivers/block/paride/pf.c
index e88c889aa7f2..d6f7bd84ed39 100644
--- a/drivers/block/paride/pf.c
+++ b/drivers/block/paride/pf.c
@@ -752,10 +752,8 @@ static struct request_queue *pf_queue;
752 752
753static void pf_end_request(int err) 753static void pf_end_request(int err)
754{ 754{
755 if (pf_req) { 755 if (pf_req && !__blk_end_request_cur(pf_req, err))
756 __blk_end_request_cur(pf_req, err);
757 pf_req = NULL; 756 pf_req = NULL;
758 }
759} 757}
760 758
761static void do_pf_request(struct request_queue * q) 759static void do_pf_request(struct request_queue * q)
@@ -763,9 +761,12 @@ static void do_pf_request(struct request_queue * q)
763 if (pf_busy) 761 if (pf_busy)
764 return; 762 return;
765repeat: 763repeat:
766 pf_req = elv_next_request(q); 764 if (!pf_req) {
767 if (!pf_req) 765 pf_req = elv_next_request(q);
768 return; 766 if (!pf_req)
767 return;
768 blkdev_dequeue_request(pf_req);
769 }
769 770
770 pf_current = pf_req->rq_disk->private_data; 771 pf_current = pf_req->rq_disk->private_data;
771 pf_block = blk_rq_pos(pf_req); 772 pf_block = blk_rq_pos(pf_req);
@@ -806,7 +807,6 @@ static int pf_next_buf(void)
806 if (!pf_count) { 807 if (!pf_count) {
807 spin_lock_irqsave(&pf_spin_lock, saved_flags); 808 spin_lock_irqsave(&pf_spin_lock, saved_flags);
808 pf_end_request(0); 809 pf_end_request(0);
809 pf_req = elv_next_request(pf_queue);
810 spin_unlock_irqrestore(&pf_spin_lock, saved_flags); 810 spin_unlock_irqrestore(&pf_spin_lock, saved_flags);
811 if (!pf_req) 811 if (!pf_req)
812 return 1; 812 return 1;