* [PATCH] drivers, block: virtio_blk: Replace cryptic number with the macro
@ 2011-04-23 18:49 Liu Yuan
2011-04-27 5:16 ` Rusty Russell
0 siblings, 1 reply; 2+ messages in thread
From: Liu Yuan @ 2011-04-23 18:49 UTC (permalink / raw)
To: Rusty Russell, Jens Axboe, Michael S. Tsirkin; +Cc: linux-kernel
From: Liu Yuan <tailai.ly@taobao.com>
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>
---
drivers/block/virtio_blk.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index 6ecf89c..d6a426a 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -6,6 +6,7 @@
#include <linux/virtio.h>
#include <linux/virtio_blk.h>
#include <linux/scatterlist.h>
+#include <scsi/scsi_cmnd.h>
#define PART_BITS 4
@@ -141,7 +142,7 @@ static bool do_req(struct request_queue *q, struct virtio_blk *vblk,
num = blk_rq_map_sg(q, vbr->req, vblk->sg + out);
if (vbr->req->cmd_type == REQ_TYPE_BLOCK_PC) {
- sg_set_buf(&vblk->sg[num + out + in++], vbr->req->sense, 96);
+ sg_set_buf(&vblk->sg[num + out + in++], vbr->req->sense, SCSI_SENSE_BUFFERSIZE);
sg_set_buf(&vblk->sg[num + out + in++], &vbr->in_hdr,
sizeof(vbr->in_hdr));
}
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drivers, block: virtio_blk: Replace cryptic number with the macro
2011-04-23 18:49 [PATCH] drivers, block: virtio_blk: Replace cryptic number with the macro Liu Yuan
@ 2011-04-27 5:16 ` Rusty Russell
0 siblings, 0 replies; 2+ messages in thread
From: Rusty Russell @ 2011-04-27 5:16 UTC (permalink / raw)
To: Liu Yuan, Jens Axboe, Michael S. Tsirkin; +Cc: linux-kernel, Christoph Hellwig
On Sun, 24 Apr 2011 02:49:26 +0800, Liu Yuan <namei.unix@gmail.com> wrote:
> From: Liu Yuan <tailai.ly@taobao.com>
>
> 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>
Thanks, applied!
Cheers,
Rusty.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-04-27 6:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-23 18:49 [PATCH] drivers, block: virtio_blk: Replace cryptic number with the macro Liu Yuan
2011-04-27 5:16 ` Rusty Russell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.