From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55922) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T2rJf-00024X-Ds for qemu-devel@nongnu.org; Sat, 18 Aug 2012 18:16:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T2rJe-0005N8-Hh for qemu-devel@nongnu.org; Sat, 18 Aug 2012 18:16:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:19209) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T2rJe-0005N2-Aa for qemu-devel@nongnu.org; Sat, 18 Aug 2012 18:16:22 -0400 Message-ID: <50301431.6090904@redhat.com> Date: Sun, 19 Aug 2012 00:16:17 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1345170981-7738-1-git-send-email-ronniesahlberg@gmail.com> <1345170981-7738-3-git-send-email-ronniesahlberg@gmail.com> <50300FF1.7070109@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/2] ISCSI: Force scsi-generic for MMC with blank disks List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: ronnie sahlberg Cc: kwolf@redhat.com, qemu-devel@nongnu.org Il 19/08/2012 00:02, ronnie sahlberg ha scritto: > Neither of them work, basically because in > block.c:find_image_format() > > if bs->sg is not set in > > if (bs->sg || !bdrv_is_inserted(bs)) { > > then we continue to > > ret = bdrv_pread(bs, 0, buf, sizeof(buf)); > > which fails with an error. > So this patch is basically to prevent find_image_format() from trying > to read from a blank disk. > > Maybe there is a better way to do this? Yeah, I think in this case find_image_format should just use raw. Paolo