From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=45860 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ODduF-0003bD-Vm for qemu-devel@nongnu.org; Sun, 16 May 2010 09:29:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ODduE-0002xQ-Df for qemu-devel@nongnu.org; Sun, 16 May 2010 09:29:23 -0400 Received: from verein.lst.de ([213.95.11.210]:39806) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ODduE-0002xJ-0r for qemu-devel@nongnu.org; Sun, 16 May 2010 09:29:22 -0400 Date: Sun, 16 May 2010 15:29:17 +0200 From: Christoph Hellwig Message-ID: <20100516132917.GA27075@lst.de> References: <1273930252-12673-1-git-send-email-nab@linux-iscsi.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1273930252-12673-1-git-send-email-nab@linux-iscsi.org> Subject: [Qemu-devel] Re: [PATCH 1/2] [block]: Fix scsi-generic breakage in find_image_format() List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Nicholas A. Bellinger" Cc: Kevin Wolf , kvm-devel , qemu-devel , Hannes Reinecke , Christoph Hellwig , Gerd Hoffmann On Sat, May 15, 2010 at 06:30:52AM -0700, Nicholas A. Bellinger wrote: > From: Nicholas Bellinger > > This patch adds a special BlockDriverState->sg check in block.c:find_image_format() > after bdrv_file_open() -> block/raw-posix.c:hdev_open() has been called to determine > if we are dealing with a Linux host scsi-generic device or not. > > The patch then returns the BlockDriver * from find_protocol(), skipping the subsequent > bdrv_read() and rest of find_image_format(). That's not quite correct as we don't want to expose formats directly. Returning bdrv_find_format("raw"); should fix it for now, although I really hate having these special cases in block.c.