All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
Cc: Kevin Wolf <kwolf@redhat.com>, Christoph Hellwig <hch@lst.de>,
	Gerd Hoffmann <kraxel@redhat.com>, Hannes Reinecke <hare@suse.de>,
	kvm-devel <kvm@vger.kernel.org>,
	qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [PATCH 1/2] [block]: Fix scsi-generic breakage in find_image_format()
Date: Sun, 16 May 2010 15:29:17 +0200	[thread overview]
Message-ID: <20100516132917.GA27075@lst.de> (raw)
In-Reply-To: <1273930252-12673-1-git-send-email-nab@linux-iscsi.org>

On Sat, May 15, 2010 at 06:30:52AM -0700, Nicholas A. Bellinger wrote:
> From: Nicholas Bellinger <nab@linux-iscsi.org>
> 
> 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.


WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de>
To: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
Cc: Kevin Wolf <kwolf@redhat.com>, kvm-devel <kvm@vger.kernel.org>,
	qemu-devel <qemu-devel@nongnu.org>,
	Hannes Reinecke <hare@suse.de>, Christoph Hellwig <hch@lst.de>,
	Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] Re: [PATCH 1/2] [block]: Fix scsi-generic breakage in find_image_format()
Date: Sun, 16 May 2010 15:29:17 +0200	[thread overview]
Message-ID: <20100516132917.GA27075@lst.de> (raw)
In-Reply-To: <1273930252-12673-1-git-send-email-nab@linux-iscsi.org>

On Sat, May 15, 2010 at 06:30:52AM -0700, Nicholas A. Bellinger wrote:
> From: Nicholas Bellinger <nab@linux-iscsi.org>
> 
> 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.

  reply	other threads:[~2010-05-16 13:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-15 13:30 [PATCH 1/2] [block]: Fix scsi-generic breakage in find_image_format() Nicholas A. Bellinger
2010-05-15 13:30 ` [Qemu-devel] " Nicholas A. Bellinger
2010-05-16 13:29 ` Christoph Hellwig [this message]
2010-05-16 13:29   ` [Qemu-devel] " Christoph Hellwig
2010-05-17  1:50   ` Nicholas A. Bellinger
2010-05-17  1:50     ` [Qemu-devel] " Nicholas A. Bellinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100516132917.GA27075@lst.de \
    --to=hch@lst.de \
    --cc=hare@suse.de \
    --cc=kraxel@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=kwolf@redhat.com \
    --cc=nab@linux-iscsi.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.