From 4ce1420d99ab7d4cf6e06a217c3789d4ffe185f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Luis=20V=C3=A1zquez=20Cao?= Date: Thu, 14 Aug 2008 09:59:13 +0200 Subject: [PATCH] --- yaml --- r: 110457 b: refs/heads/master c: 766ca4428d1239a970926856c447310c9c191af2 h: refs/heads/master i: 110455: 77b22a05aeba87549b30de78df8e66d1a19805b8 v: v3 --- [refs] | 2 +- trunk/drivers/block/virtio_blk.c | 4 ++-- trunk/include/linux/blkdev.h | 5 +++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 936408ffc450..2e11163af99a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1a8e2bddd5c29008f311613e75925fecbf522c5b +refs/heads/master: 766ca4428d1239a970926856c447310c9c191af2 diff --git a/trunk/drivers/block/virtio_blk.c b/trunk/drivers/block/virtio_blk.c index 42251095134f..879506a2c234 100644 --- a/trunk/drivers/block/virtio_blk.c +++ b/trunk/drivers/block/virtio_blk.c @@ -84,11 +84,11 @@ static bool do_req(struct request_queue *q, struct virtio_blk *vblk, if (blk_fs_request(vbr->req)) { vbr->out_hdr.type = 0; vbr->out_hdr.sector = vbr->req->sector; - vbr->out_hdr.ioprio = vbr->req->ioprio; + vbr->out_hdr.ioprio = req_get_ioprio(vbr->req); } else if (blk_pc_request(vbr->req)) { vbr->out_hdr.type = VIRTIO_BLK_T_SCSI_CMD; vbr->out_hdr.sector = 0; - vbr->out_hdr.ioprio = vbr->req->ioprio; + vbr->out_hdr.ioprio = req_get_ioprio(vbr->req); } else { /* We don't put anything else in the queue. */ BUG(); diff --git a/trunk/include/linux/blkdev.h b/trunk/include/linux/blkdev.h index f131776f029e..490ce458b031 100644 --- a/trunk/include/linux/blkdev.h +++ b/trunk/include/linux/blkdev.h @@ -232,6 +232,11 @@ struct request { struct request *next_rq; }; +static inline unsigned short req_get_ioprio(struct request *req) +{ + return req->ioprio; +} + /* * State information carried for REQ_TYPE_PM_SUSPEND and REQ_TYPE_PM_RESUME * requests. Some step values could eventually be made generic.