From: Paolo Bonzini <pbonzini@redhat.com>
To: ronnie sahlberg <ronniesahlberg@gmail.com>
Cc: kwolf@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] ISCSI: Force scsi-generic for MMC with blank disks
Date: Sun, 19 Aug 2012 00:41:13 +0200 [thread overview]
Message-ID: <50301A09.2060503@redhat.com> (raw)
In-Reply-To: <CAN05THQFQODnAPrY-3rpECRE8BhRoxdtDbc0kAHK3X3_6R78WA@mail.gmail.com>
Il 19/08/2012 00:19, ronnie sahlberg ha scritto:
>> > Yeah, I think in this case find_image_format should just use raw.
> Ok, so that is basically what the patch does. It forces bs->sg==true
> so that we pick "raw" right there instead of trying to read from the
> device.
>
> So you are happy with the patch ?
No, the solution should be the same that allows "touch ff + qemu-kvm
-hda ff" to work. This is implemented here:
if (ret >= 0 && ret < aiocb->aio_nbytes && aiocb->common.bs->growable) {
/* A short read means that we have reached EOF. Pad the buffer
* with zeros for bytes after EOF. */
iov_memset(aiocb->aio_iov, aiocb->aio_niov, ret,
0, aiocb->aio_nbytes - ret);
ret = aiocb->aio_nbytes;
}
and block/iscsi.c should do the same.
Paolo
next prev parent reply other threads:[~2012-08-18 22:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-17 2:36 [Qemu-devel] [PATCH] Two trivial patches for iSCSI and blank DVDs Ronnie Sahlberg
2012-08-17 2:36 ` [Qemu-devel] [PATCH 1/2] ISCSI: Set number of blocks to 0 for blank CDROM devices Ronnie Sahlberg
2012-08-18 21:57 ` Paolo Bonzini
2012-08-18 22:06 ` ronnie sahlberg
2012-08-17 2:36 ` [Qemu-devel] [PATCH 2/2] ISCSI: Force scsi-generic for MMC with blank disks Ronnie Sahlberg
2012-08-18 14:23 ` Blue Swirl
2012-08-18 21:58 ` Paolo Bonzini
2012-08-18 22:02 ` ronnie sahlberg
2012-08-18 22:04 ` ronnie sahlberg
2012-08-18 22:16 ` Paolo Bonzini
2012-08-18 22:19 ` ronnie sahlberg
2012-08-18 22:41 ` Paolo Bonzini [this message]
2012-08-18 22:20 ` Paolo Bonzini
2012-08-18 23:44 ` ronnie sahlberg
2012-08-19 10:16 ` Paolo Bonzini
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=50301A09.2060503@redhat.com \
--to=pbonzini@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=ronniesahlberg@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).