Skip to contentSkip to conversation

Fix scsi-generic breakage in upstream qemu-kvm.git

PATCH Applied Nicholas A. Bellinger 2 participants 4 messages May 17, 2010 – May 28, 2010 KVM

lore
Share & tools
lore
#0 lore raw

cover Fix scsi-generic breakage in upstream qemu-kvm.git

From: Nicholas Bellinger <[email protected]>

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.

Nicholas Bellinger (2):
[block]: Make find_image_format() return 'raw' BlockDriver for SG_IO
devices
[block]: Add SG_IO device check in refresh_total_sectors()

 block.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
Applied
#1 lore raw

Am 17.05.2010 18:45, schrieb Nicholas A. Bellinger:

Quoted 10 lines

From: Nicholas Bellinger <[email protected]>

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.

Thanks, applied all to the block branch, even though I forgot to reply here.

Kevin

#2 lore raw
Quoted 8 lines · Kevin Wolf

Am 17.05.2010 18:45, schrieb Nicholas A. Bellinger:

Quoted 7 lines

From: Nicholas Bellinger <[email protected]>

Greetings,

Attached are the updated patches following hch's comments to fix scsi-generic device breakage with find_image_format() and refresh_total_sectors().

Quoted 7 lines
Quoted 3 lines

These are being resent as the last attachments where in MBOX format from git-format-patch.

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()

---
 block.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
block.c +3 -1
index 7a379dc..88dbc00 100644
@@ -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);
Signature · 1 line
1.5.6.5
#3 lore raw

Am 27.05.2010 17:56, schrieb Nicholas A. Bellinger:

Quoted 17 lines · Kevin Wolf
Quoted 8 lines

Am 17.05.2010 18:45, schrieb Nicholas A. Bellinger:

Quoted 7 lines

From: Nicholas Bellinger <[email protected]>

Greetings,

Attached are the updated patches following hch's comments to fix scsi-generic device breakage with find_image_format() and refresh_total_sectors().

Quoted 7 lines
Quoted 3 lines

These are being resent as the last attachments where in MBOX format from git-format-patch.

Thanks, applied all to the block branch, even though I forgot to reply here.

Kevin

Quoted 8 lines

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!

Right, thanks for the fix. I've applied it to the block branch.

Kevin