qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/2] ISCSI: Force scsi-generic for MMC with blan


From: Paolo Bonzini
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
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]