qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 0/2] Fix scsi-generic breakage in upstream qemu-


From: Nicholas A. Bellinger
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

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 <address@hidden>
> > 
> > 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 <address@hidden>
> 
> 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 <address@hidden>
Reported-by: Chris Krumme <address@hidden>
---
 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 via email to

[Prev in Thread] Current Thread [Next in Thread]