kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: 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-de
Cc: Nicholas Bellinger <nab@linux-iscsi.org>
Subject: [PATCH 0/2] Fix scsi-generic breakage in upstream qemu-kvm.git
Date: Sat, 15 May 2010 06:30:45 -0700	[thread overview]
Message-ID: <1273930245-12651-1-git-send-email-nab@linux-iscsi.org> (raw)

From: Nicholas Bellinger <nab@linux-iscsi.org>

Greetings Kevin and hch,

After pulling from upstream qemu-kvm.git/master into the megasas qemu-kvm.git tree,
I ran into some breakage with scsi-generic devices returning an -ESPIPE exception in
bdrv_open() -> find_image_format() -> bdrv_read(), and then again from
brdv_open_common() -> refresh_total_sectors() -> raw_getlength() -> lseek().

This breakage appears to be fallout from:

commit b6ce07aa83bdee3cfd2610f270a0ce304e78df95
Author: Kevin Wolf <kwolf@redhat.com>
Date:   Mon Apr 12 16:37:13 2010 +0200

    block: Split bdrv_open
    
    bdrv_open contains quite some code that is only useful for opening images (as
    opposed to opening files by a protocol), for example snapshots.
    
    This patch splits the code so that we have bdrv_open_file() for files (uses
    protocols), bdrv_open() for images (uses format drivers) and bdrv_open_common()
    for the code common for opening both images and files.

commit 66f82ceed6781261c09e65fb440ca76842fd0500
Author: Kevin Wolf <kwolf@redhat.com>
Date:   Wed Apr 14 14:17:38 2010 +0200

    block: Open the underlying image file in generic code
    
    Format drivers shouldn't need to bother with things like file names, but rather
    just get an open BlockDriverState for the underlying protocol. This patch
    introduces this behaviour for bdrv_open implementation. For protocols which
    need to access the filename to open their file/device/connection/... a new
    callback bdrv_file_open is introduced which doesn't get an underlying file
    opened.


The following are two patches that where required in order to get hw/scsi-generic.c
working with the latest upstream qemu-kvm.git/master.  They appear to be straight
forward enough, and have been lightly tested with megasas+SG_IO on a v2.6.34-rc7 KVM
host.

Please have a look and apply!

Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>

Nicholas Bellinger (2):
  [block]: Fix scsi-generic breakage in find_image_format()
  [block]: Skip refresh_total_sectors() for scsi-generic devices

 block.c |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)


             reply	other threads:[~2010-05-15  5:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-15 13:30 Nicholas A. Bellinger [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-05-17 16:45 [PATCH 0/2] Fix scsi-generic breakage in upstream qemu-kvm.git 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=1273930245-12651-1-git-send-email-nab@linux-iscsi.org \
    --to=nab@linux-iscsi.org \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=kraxel@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=kwolf@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).