aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/virtio_blk.c
diff options
context:
space:
mode:
authorLiu Yuan <tailai.ly@taobao.com>2011-04-23 14:49:26 -0400
committerRusty Russell <rusty@rustcorp.com.au>2011-05-29 21:44:13 -0400
commit6917f83ffe5e6b6414ccc845263b792ed201c0f1 (patch)
treee90ecfcad36fc10e679ae0b6d2a7e5e725b58d1e /drivers/block/virtio_blk.c
parent7a7c924cf03da2a76ea4dc0aac1a788cf95a9c29 (diff)
drivers, block: virtio_blk: Replace cryptic number with the macro
It is easier to figure out the context by reading SCSI_SENSE_BUFFERSIZE instead of plain '96'. Signed-off-by: Liu Yuan <tailai.ly@taobao.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/block/virtio_blk.c')
-rw-r--r--drivers/block/virtio_blk.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index 33a48a80c7e8..079c08808d8a 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -7,6 +7,7 @@
7#include <linux/virtio_blk.h> 7#include <linux/virtio_blk.h>
8#include <linux/scatterlist.h> 8#include <linux/scatterlist.h>
9#include <linux/string_helpers.h> 9#include <linux/string_helpers.h>
10#include <scsi/scsi_cmnd.h>
10 11
11#define PART_BITS 4 12#define PART_BITS 4
12 13
@@ -146,7 +147,7 @@ static bool do_req(struct request_queue *q, struct virtio_blk *vblk,
146 num = blk_rq_map_sg(q, vbr->req, vblk->sg + out); 147 num = blk_rq_map_sg(q, vbr->req, vblk->sg + out);
147 148
148 if (vbr->req->cmd_type == REQ_TYPE_BLOCK_PC) { 149 if (vbr->req->cmd_type == REQ_TYPE_BLOCK_PC) {
149 sg_set_buf(&vblk->sg[num + out + in++], vbr->req->sense, 96); 150 sg_set_buf(&vblk->sg[num + out + in++], vbr->req->sense, SCSI_SENSE_BUFFERSIZE);
150 sg_set_buf(&vblk->sg[num + out + in++], &vbr->in_hdr, 151 sg_set_buf(&vblk->sg[num + out + in++], &vbr->in_hdr,
151 sizeof(vbr->in_hdr)); 152 sizeof(vbr->in_hdr));
152 } 153 }