qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/3] vpc: support probing of fixed size images
@ 2014-08-01 13:39 Levente Kurusa
  2014-08-01 13:39 ` [Qemu-devel] [PATCH 1/3] block: format: pass down the current state to the format's probe function Levente Kurusa
                   ` (3 more replies)
  0 siblings, 4 replies; 23+ messages in thread
From: Levente Kurusa @ 2014-08-01 13:39 UTC (permalink / raw)
  To: Kevin Wolf, Stefan Hajnoczi
  Cc: Andrew Jones, Stefan Weil, Levente Kurusa, Fam Zheng,
	QEMU Developers

Fixed size VPC images do not have a footer, hence the current probe
function will fail and QEMU will fall back to the raw_bsd driver, which is
not the correct behaviour. The specification of the format says that fixed
size images have a footer as the last 512 bytes of the file. The footer is
exactly the same as the header would be in the case of dynamically growing
images.

For this, we need to read the last 512 bytes of the image, however the
current mechanics predominantly read the first 2048 bytes and pass that
as a buffer to the probe functions. Solve this by passing the
BlockDriverState to the probe functions, hence giving them a chance to read
the extra bytes they might need.

Levente Kurusa (3):
  block: format: pass down the current state to the format's probe
    function
  block: vpc: introduce vpc_check_signature function
  block: vpc: handle fixed size images in probe function

 block.c                   |  2 +-
 block/bochs.c             |  3 ++-
 block/cloop.c             |  3 ++-
 block/cow.c               |  3 ++-
 block/dmg.c               |  3 ++-
 block/parallels.c         |  3 ++-
 block/qcow.c              |  3 ++-
 block/qcow2.c             |  3 ++-
 block/qed.c               |  4 ++--
 block/raw_bsd.c           |  3 ++-
 block/vdi.c               |  3 ++-
 block/vmdk.c              |  3 ++-
 block/vpc.c               | 34 +++++++++++++++++++++++++++++-----
 include/block/block_int.h |  3 ++-
 14 files changed, 54 insertions(+), 19 deletions(-)

-- 
1.9.3

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2014-08-15 14:51 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-01 13:39 [Qemu-devel] [PATCH 0/3] vpc: support probing of fixed size images Levente Kurusa
2014-08-01 13:39 ` [Qemu-devel] [PATCH 1/3] block: format: pass down the current state to the format's probe function Levente Kurusa
2014-08-01 13:40 ` [Qemu-devel] [PATCH 2/3] block: vpc: introduce vpc_check_signature function Levente Kurusa
2014-08-01 13:40 ` [Qemu-devel] [PATCH 3/3] block: vpc: handle fixed size images in probe function Levente Kurusa
2014-08-12 13:20 ` [Qemu-devel] [PATCH 0/3] vpc: support probing of fixed size images Stefan Hajnoczi
2014-08-12 13:35   ` Jeff Cody
2014-08-14 14:42     ` Levente Kurusa
2014-08-14 14:57       ` Jeff Cody
2014-08-15 10:55         ` Kevin Wolf
2014-08-15 11:21           ` Markus Armbruster
2014-08-15 12:28             ` Jeff Cody
2014-08-15 12:59               ` Markus Armbruster
2014-08-15 13:13               ` Eric Blake
2014-08-15 13:25                 ` Jeff Cody
2014-08-15 12:14           ` Jeff Cody
2014-08-15 13:19             ` Eric Blake
2014-08-15 13:37             ` Kevin Wolf
2014-08-15 13:52               ` Jeff Cody
2014-08-15 14:00               ` Eric Blake
2014-08-15 14:10                 ` Jeff Cody
2014-08-15 14:22                   ` Eric Blake
2014-08-15 14:51                     ` Jeff Cody
2014-08-15 14:42                 ` Kevin Wolf

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