From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 1/2] [block]: Fix scsi-generic breakage in find_image_format() Date: Sun, 16 May 2010 15:29:17 +0200 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 Cc: Kevin Wolf , Christoph Hellwig , Gerd Hoffmann , Hannes Reinecke , kvm-devel , qemu-devel To: "Nicholas A. Bellinger" Return-path: Received: from verein.lst.de ([213.95.11.210]:36969 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752605Ab0EPN3f (ORCPT ); Sun, 16 May 2010 09:29:35 -0400 Content-Disposition: inline In-Reply-To: <1273930252-12673-1-git-send-email-nab@linux-iscsi.org> Sender: kvm-owner@vger.kernel.org List-ID: 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.