aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/ll_rw_blk.c
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@SteelEye.com>2005-06-20 14:11:09 +0200
committerJens Axboe <axboe@suse.de>2005-06-20 14:11:09 +0200
commit994ca9a19616f0d4161a9e825f0835925d522426 (patch)
tree0998252ed375929dca468440b7486d4c1104757f /drivers/block/ll_rw_blk.c
parent[PATCH] kill 'reading' variable in sg_io(), it isn't used anymore. (diff)
downloadlinux-dev-994ca9a19616f0d4161a9e825f0835925d522426.tar.xz
linux-dev-994ca9a19616f0d4161a9e825f0835925d522426.zip
[PATCH] update blk_execute_rq to take an at_head parameter
Original From: Mike Christie <michaelc@cs.wisc.edu> Modified to split out block changes (this patch) and SCSI pieces. Signed-off-by: Jens Axboe <axboe@suse.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/block/ll_rw_blk.c')
-rw-r--r--drivers/block/ll_rw_blk.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/block/ll_rw_blk.c b/drivers/block/ll_rw_blk.c
index 874e46fc3748..d260a2ce9a70 100644
--- a/drivers/block/ll_rw_blk.c
+++ b/drivers/block/ll_rw_blk.c
@@ -2269,13 +2269,14 @@ void blk_execute_rq_nowait(request_queue_t *q, struct gendisk *bd_disk,
* @q: queue to insert the request in
* @bd_disk: matching gendisk
* @rq: request to insert
+ * @at_head: insert request at head or tail of queue
*
* Description:
* Insert a fully prepared request at the back of the io scheduler queue
* for execution.
*/
int blk_execute_rq(request_queue_t *q, struct gendisk *bd_disk,
- struct request *rq)
+ struct request *rq, int at_head)
{
DECLARE_COMPLETION(wait);
char sense[SCSI_SENSE_BUFFERSIZE];
@@ -2294,7 +2295,7 @@ int blk_execute_rq(request_queue_t *q, struct gendisk *bd_disk,
}
rq->waiting = &wait;
- blk_execute_rq_nowait(q, bd_disk, rq, 0, blk_end_sync_rq);
+ blk_execute_rq_nowait(q, bd_disk, rq, at_head, blk_end_sync_rq);
wait_for_completion(&wait);
rq->waiting = NULL;
@@ -2361,7 +2362,7 @@ int blkdev_scsi_issue_flush_fn(request_queue_t *q, struct gendisk *disk,
rq->data_len = 0;
rq->timeout = 60 * HZ;
- ret = blk_execute_rq(q, disk, rq);
+ ret = blk_execute_rq(q, disk, rq, 0);
if (ret && error_sector)
*error_sector = rq->sector;