From: Eric Blake <eblake@redhat.com>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
qemu-devel@nongnu.org, qemu-block@nongnu.org,
pbonzini@redhat.com, zxq_yx_007@163.com
Subject: Re: [Qemu-devel] [PATCH] scsi-disk: fix reads from scsi-disk devices
Date: Fri, 3 Jun 2016 06:42:54 -0600 [thread overview]
Message-ID: <57517B4E.6010606@redhat.com> (raw)
In-Reply-To: <1464931021-25117-1-git-send-email-mark.cave-ayland@ilande.co.uk>
[-- Attachment #1: Type: text/plain, Size: 1298 bytes --]
On 06/02/2016 11:17 PM, Mark Cave-Ayland wrote:
> Commit fcaafb1001b9c42817714dd3b2aadcfdb997b53d accidentally broke reads from
> scsi-disk devices when being updated from its original form to use the new
> byte-based block functions. Add the extra missing sector to offset conversion
> in order to restore read functionality.
>
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> ---
> hw/scsi/scsi-disk.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Eric Blake <eblake@redhat.com>
>
> diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
> index ace65e0..ab7cf9c 100644
> --- a/hw/scsi/scsi-disk.c
> +++ b/hw/scsi/scsi-disk.c
> @@ -347,7 +347,7 @@ static void scsi_do_read(SCSIDiskReq *r, int ret)
> scsi_init_iovec(r, SCSI_DMA_BUF_SIZE);
> block_acct_start(blk_get_stats(s->qdev.conf.blk), &r->acct,
> r->qiov.size, BLOCK_ACCT_READ);
> - r->req.aiocb = sdc->dma_readv(r->sector, &r->qiov,
> + r->req.aiocb = sdc->dma_readv(r->sector << BDRV_SECTOR_BITS, &r->qiov,
> scsi_read_complete, r, r);
> }
>
>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2016-06-03 12:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-03 5:17 [Qemu-devel] [PATCH] scsi-disk: fix reads from scsi-disk devices Mark Cave-Ayland
2016-06-03 6:10 ` xiaoqiang zhao
2016-06-03 12:42 ` Eric Blake [this message]
2016-06-06 12:58 ` Peter Maydell
2016-06-07 1:44 ` Benjamin Herrenschmidt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57517B4E.6010606@redhat.com \
--to=eblake@redhat.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=zxq_yx_007@163.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.