From patchwork Thu May 27 15:56:28 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Nicholas A. Bellinger" X-Patchwork-Id: 102716 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4RFucbG010490 for ; Thu, 27 May 2010 15:56:38 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757865Ab0E0P4g (ORCPT ); Thu, 27 May 2010 11:56:36 -0400 Received: from smtp105.sbc.mail.gq1.yahoo.com ([67.195.14.108]:35317 "HELO smtp105.sbc.mail.gq1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1756763Ab0E0P4f (ORCPT ); Thu, 27 May 2010 11:56:35 -0400 Received: (qmail 12640 invoked from network); 27 May 2010 15:56:34 -0000 Received: from adsl-70-231-246-220.dsl.snfc21.sbcglobal.net (nab@70.231.246.220 with plain) by smtp105.sbc.mail.gq1.yahoo.com with SMTP; 27 May 2010 08:56:34 -0700 PDT X-Yahoo-SMTP: fzDSGlOswBCWnIOrNw7KwwK1j9PqyNbe5PtLKiS4dDU.UNl_t6bdEZu9tTLW X-YMail-OSG: 4pWG7jYVM1nfrNvWBjBwKVMlvqFECH3fK28osiqf8_joQi9wdeU1o2zQop.SghxgyEKx22S0AEbLVwCbDl6DwdG38rwMI29tX4WK7Ndp0J93YIpXMq3O9R1JMPjSgqzZYgOhFwovvhN1D7NXyzqgsq0OalZ1Jp7EHbAr0X6Gxt5TmSx7PraecfpLBwXWi8g5SdYvjJ.70qH5e2nesxTY.nF5VQQv8fujqOCQeS18jA1XGP55T_IQ2jaYw8kGIBQyHfTlipsl6v14vEoE6BIGcJEJi9cFERxLQppyUtSbJoRt9bGlZnSdsp7vDfxu6PxFh2gCOMpwB6buO2JyImURrnBGDznz0Q-- X-Yahoo-Newman-Property: ymail-3 Subject: Re: [Qemu-devel] [PATCH 0/2] Fix scsi-generic breakage in upstream qemu-kvm.git From: "Nicholas A. Bellinger" To: Kevin Wolf Cc: Christoph Hellwig , Gerd Hoffmann , Hannes Reinecke , kvm-devel , qemu-devel , Chris Krumme In-Reply-To: <4BF536A0.1020305@redhat.com> References: <1274114750-27933-1-git-send-email-nab@linux-iscsi.org> <4BF536A0.1020305@redhat.com> Date: Thu, 27 May 2010 08:56:28 -0700 Message-Id: <1274975788.16907.38.camel@haakon2.linux-iscsi.org> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 27 May 2010 15:56:38 +0000 (UTC) diff --git a/block.c b/block.c index 7a379dc..88dbc00 100644 --- a/block.c +++ b/block.c @@ -334,8 +334,10 @@ static BlockDriver *find_image_format(const char *filename) return NULL; /* Return the raw BlockDriver * to scsi-generic devices */ - if (bs->sg) + if (bs->sg) { + bdrv_delete(bs); return bdrv_find_format("raw"); + } ret = bdrv_pread(bs, 0, buf, sizeof(buf)); bdrv_delete(bs);