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>
Cc: 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>,
	Chris Krumme <chris.krumme@windriver.com>
Subject: Re: [Qemu-devel] [PATCH 0/2] Fix scsi-generic breakage in upstream qemu-kvm.git
Date: Thu, 27 May 2010 08:56:28 -0700	[thread overview]
Message-ID: <1274975788.16907.38.camel@haakon2.linux-iscsi.org> (raw)
In-Reply-To: <4BF536A0.1020305@redhat.com>

On Thu, 2010-05-20 at 15:18 +0200, Kevin Wolf wrote:
> Am 17.05.2010 18:45, schrieb Nicholas A. Bellinger:
> > From: Nicholas Bellinger <nab@linux-iscsi.org>
> > 
> > Greetings,
> > 
> > Attached are the updated patches following hch's comments to fix scsi-generic
> > device breakage with find_image_format() and refresh_total_sectors().
> > 
> > These are being resent as the last attachments where in MBOX format from git-format-patch.
> > 
> > Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
> 
> Thanks, applied all to the block branch, even though I forgot to reply here.
> 
> Kevin

Hi Kevin,

Thanks for accepting the series.  There is one more piece of breakage
that Chris Krumme found in block.c:find_image_format() in the original
patch.  Please apply the patch to add the missing bdrv_delete() for the
SG_IO case below.

Thanks for pointing this out Chris!

Best,

--nab

[PATCH] [block]: Add missing bdrv_delete() for SG_IO BlockDriver in find_image_format()

This patch adds a missing bdrv_delete() call in find_image_format() so that a
SG_IO BlockDriver properly releases the temporary BlockDriverState *bs created
from bdrv_file_open()

Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
Reported-by: Chris Krumme <chris.krumme@windriver.com>
---
 block.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

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);
-- 
1.5.6.5





  reply	other threads:[~2010-05-27 15:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-17 16:45 [PATCH 0/2] Fix scsi-generic breakage in upstream qemu-kvm.git Nicholas A. Bellinger
2010-05-20 13:18 ` [Qemu-devel] " Kevin Wolf
2010-05-27 15:56   ` Nicholas A. Bellinger [this message]
2010-05-28 11:32     ` Kevin Wolf

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=1274975788.16907.38.camel@haakon2.linux-iscsi.org \
    --to=nab@linux-iscsi.org \
    --cc=chris.krumme@windriver.com \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=kraxel@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=kwolf@redhat.com \
    --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 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).