[Qemu-devel] [PATCH 1/7] block: correctly set the keep_read_only flag

2012-08-30 Thread Jeff Cody
, ro = 1 | v [ snap-1 ] kro = 0, ro = 1 | v [ snap-2 ] kro = 0, ro = 1 | v [ active ] kro = 0, ro = 0 Signed-off-by: Jeff Cody jc...@redhat.com --- block.c | 16 +++- block.h | 1 + 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/block.c b

Re: [Qemu-devel] [RFC v2 PATCH 0/6] Live block commit

2012-08-30 Thread Jeff Cody
On 08/30/2012 02:47 PM, Jeff Cody wrote: Live block commit. I originally had intended for this RFC series to include the more complicated case of a live commit of the active layer, but removed it for this commit in the hopes of making it into the soft feature freeze for 1.2, so this series

Re: [Qemu-devel] [RFC v2 PATCH 4/6] qerror: new error for live block commit, QERR_TOP_NOT_FOUND

2012-08-31 Thread Jeff Cody
On 08/30/2012 06:55 PM, Eric Blake wrote: On 08/30/2012 11:47 AM, Jeff Cody wrote: Signed-off-by: Jeff Cody jc...@redhat.com --- qerror.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qerror.h b/qerror.h index d0a76a4..7396184 100644 --- a/qerror.h +++ b/qerror.h @@ -219,6

Re: [Qemu-devel] [PATCH 3/7] block: raw-posix image file reopen

2012-08-31 Thread Jeff Cody
On 08/30/2012 06:15 PM, Eric Blake wrote: On 08/30/2012 11:47 AM, Jeff Cody wrote: This is derived from the Supriya Kannery's reopen patches. This contains the raw-posix driver changes for the bdrv_reopen_* functions. All changes are staged into a temporary scratch buffer during the prepare

Re: [Qemu-devel] [RFC v2 PATCH 6/6] QAPI: add command for live block commit, 'block-commit'

2012-08-31 Thread Jeff Cody
On 08/30/2012 07:06 PM, Eric Blake wrote: On 08/30/2012 11:47 AM, Jeff Cody wrote: The command for live block commit is added, which has the following arguments: device: the block device to perform the commit on (mandatory) base: the base image to commit into; optional (if not specified

Re: [Qemu-devel] [PATCH 3/7] block: raw-posix image file reopen

2012-08-31 Thread Jeff Cody
On 08/31/2012 10:49 AM, Kevin Wolf wrote: Am 31.08.2012 16:42, schrieb Jeff Cody: On 08/30/2012 06:15 PM, Eric Blake wrote: On 08/30/2012 11:47 AM, Jeff Cody wrote: This is derived from the Supriya Kannery's reopen patches. This contains the raw-posix driver changes for the bdrv_reopen_

Re: [Qemu-devel] [v2 Patch 8/9]block: Cmd block_set_hostcache for dynamic cache change

2012-08-31 Thread Jeff Cody
On 08/01/2012 02:44 PM, Supriya Kannery wrote: New command block_set_hostcache added for dynamically changing host pagecache setting of a block device. Usage: block_set_hostcache device option device = block device option = on/off Example: (qemu) block_set_hostcache ide0-hd0

Re: [Qemu-devel] [PATCH 1/7] block: correctly set the keep_read_only flag

2012-09-05 Thread Jeff Cody
On 09/05/2012 08:47 AM, Kevin Wolf wrote: Am 30.08.2012 20:47, schrieb Jeff Cody: I believe the bs-keep_read_only flag is supposed to reflect the initial open state of the device. If the device is initially opened R/O, then commit operations, or reopen operations changing to R/W

Re: [Qemu-devel] [PATCH 2/7] block: Framework for reopening files safely

2012-09-05 Thread Jeff Cody
On 09/05/2012 11:09 AM, Kevin Wolf wrote: Am 30.08.2012 20:47, schrieb Jeff Cody: This is based heavily on Supriya Kannery's bdrv_reopen() patch series. This provides a transactional method to reopen multiple images files safely. Image files are queue for reopen via bdrv_reopen_queue

Re: [Qemu-devel] [PATCH 3/7] block: raw-posix image file reopen

2012-09-05 Thread Jeff Cody
On 09/05/2012 11:30 AM, Kevin Wolf wrote: Am 30.08.2012 20:47, schrieb Jeff Cody: This is derived from the Supriya Kannery's reopen patches. This contains the raw-posix driver changes for the bdrv_reopen_* functions. All changes are staged into a temporary scratch buffer during the prepare

Re: [Qemu-devel] [RFC v2 PATCH 1/6] block: add support functions for live commit, to find and delete images.

2012-09-06 Thread Jeff Cody
On 09/06/2012 09:23 AM, Kevin Wolf wrote: Am 30.08.2012 20:47, schrieb Jeff Cody: Add bdrv_find_child(), and bdrv_delete_intermediate(). bdrv_find_child(): given 'bs' and the active (topmost) BDS of an image chain, find the image that is the immediate top of 'bs

Re: [Qemu-devel] [RFC v2 PATCH 2/6] block: add live block commit functionality

2012-09-06 Thread Jeff Cody
On 09/06/2012 10:00 AM, Kevin Wolf wrote: Am 30.08.2012 20:47, schrieb Jeff Cody: This adds the live commit coroutine. This iteration focuses on the commit only below the active layer, and not the active layer itself. The behaviour is similar to block streaming; the sectors are walked

Re: [Qemu-devel] [RFC v2 PATCH 6/6] QAPI: add command for live block commit, 'block-commit'

2012-09-06 Thread Jeff Cody
On 09/06/2012 10:29 AM, Kevin Wolf wrote: Am 30.08.2012 20:47, schrieb Jeff Cody: The command for live block commit is added, which has the following arguments: device: the block device to perform the commit on (mandatory) base: the base image to commit into; optional (if not specified

Re: [Qemu-devel] [RFC v2 PATCH 1/6] block: add support functions for live commit, to find and delete images.

2012-09-07 Thread Jeff Cody
On 09/07/2012 06:19 AM, Kevin Wolf wrote: Am 06.09.2012 16:59, schrieb Jeff Cody: On 09/06/2012 09:23 AM, Kevin Wolf wrote: Am 30.08.2012 20:47, schrieb Jeff Cody: Add bdrv_find_child(), and bdrv_delete_intermediate(). bdrv_find_child(): given 'bs' and the active (topmost) BDS of an image

Re: [Qemu-devel] [RFC v2 PATCH 2/6] block: add live block commit functionality

2012-09-07 Thread Jeff Cody
On 09/06/2012 05:16 PM, Eric Blake wrote: On 09/06/2012 02:37 PM, Jeff Cody wrote: On 09/06/2012 10:00 AM, Kevin Wolf wrote: Am 30.08.2012 20:47, schrieb Jeff Cody: This adds the live commit coroutine. This iteration focuses on the commit only below the active layer, and not the active layer

Re: [Qemu-devel] [with qemu-git] blockcommit to a ( 'raw' format) base image fails w/ unable to open the disk image file

2012-10-09 Thread Jeff Cody
On 10/09/2012 04:54 AM, Kashyap Chamarthy wrote: Hi (Jeff?) I was testing blockcommit operations qemu-git, as of Oct-6th (which has your blockcommit code pulled in). And also w/ libvirt-git which has Eric's libvirt blockcommit patches applied. with the goal of : actual state: [base]

[Qemu-devel] [PATCH 1/2] block: make bdrv_find_backing_image compare canonical filenames

2012-10-09 Thread Jeff Cody
to the current image filename being searched, and then use realpath() to make all comparisons based on absolute filenames. This also changes bdrv_find_backing_image to no longer be recursive, but iterative. Signed-off-by: Jeff Cody jc...@redhat.com --- block.c | 38

[Qemu-devel] [PATCH 0/2] block-commit fixes

2012-10-09 Thread Jeff Cody
Eric reported some bugs with relative pathnames and block-commit. These patches attempt to fix those issues, by changing how we do some filename and path comparisons. There is also some minor simplication of error checking for block-commit as well. Jeff Cody (2): block: make

[Qemu-devel] [PATCH 2/2] block: in commit, determine base image from the top image

2012-10-09 Thread Jeff Cody
it is reachable from top. Signed-off-by: Jeff Cody jc...@redhat.com --- block/commit.c | 9 - blockdev.c | 21 +++-- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/block/commit.c b/block/commit.c index 733c914..13d9e82 100644 --- a/block/commit.c +++ b

Re: [Qemu-devel] [PATCH 1/2] block: make bdrv_find_backing_image compare canonical filenames

2012-10-10 Thread Jeff Cody
On 10/10/2012 03:34 AM, Paolo Bonzini wrote: Il 10/10/2012 07:56, Jeff Cody ha scritto: Currently, bdrv_find_backing_image compares bs-backing_file with what is passed in as a backing_file name. Mismatches may occur, however, when bs-backing_file and backing_file are both not absolute

Re: [Qemu-devel] [PATCH 1/2] block: make bdrv_find_backing_image compare canonical filenames

2012-10-10 Thread Jeff Cody
On 10/10/2012 02:13 PM, Eric Blake wrote: On 10/09/2012 11:56 PM, Jeff Cody wrote: Currently, bdrv_find_backing_image compares bs-backing_file with what is passed in as a backing_file name. Mismatches may occur, however, when bs-backing_file and backing_file are both not absolute or relative

Re: [Qemu-devel] [PATCH 1/2] block: make bdrv_find_backing_image compare canonical filenames

2012-10-10 Thread Jeff Cody
On 10/10/2012 02:34 PM, Eric Blake wrote: On 10/10/2012 12:29 PM, Jeff Cody wrote: That's a LOT of stack space, which risks stack overflow, will mostly be unused, and still doesn't work if you have super-deep hierarchies larger than PATH_MAX. Would you be better off using realpath(,NULL

Re: [Qemu-devel] [PATCH 1/2] block: make bdrv_find_backing_image compare canonical filenames

2012-10-13 Thread Jeff Cody
On 10/12/2012 05:52 PM, Eric Blake wrote: On 10/09/2012 11:56 PM, Jeff Cody wrote: Currently, bdrv_find_backing_image compares bs-backing_file with what is passed in as a backing_file name. Mismatches may occur, however, when bs-backing_file and backing_file are both not absolute or relative

[Qemu-devel] [PATCH] qmp: fix __accept() in qmp.py

2012-10-15 Thread Jeff Cody
In QEMUMonitorProtocol, commit e9d17b6 removed the __sockfile creation from __negotiate_capabilities(), which breaks _accept(). This causes failures in qemu-io python based tests (i.e. tests 030 and 040). This patch creates the sockfile in __accept() as well. --- QMP/qmp.py | 1 + 1 file

Re: [Qemu-devel] [PATCH] qmp: fix __accept() in qmp.py

2012-10-15 Thread Jeff Cody
On 10/15/2012 02:57 PM, Jeff Cody wrote: In QEMUMonitorProtocol, commit e9d17b6 removed the __sockfile creation from __negotiate_capabilities(), which breaks _accept(). This causes failures in qemu-io python based tests (i.e. tests 030 and 040). This patch creates the sockfile in __accept

[Qemu-devel] [PATCH v2] qmp: fix __accept() in qmp.py

2012-10-15 Thread Jeff Cody
In QEMUMonitorProtocol, commit e9d17b6 removed the __sockfile creation from __negotiate_capabilities(), which breaks _accept(). This causes failures in qemu-io python based tests (i.e. tests 030 and 040). This patch creates the sockfile in __accept() as well. Signed-off-by: Jeff Cody jc

[Qemu-devel] [PATCH v2 0/4] block-commit fixes

2012-10-16 Thread Jeff Cody
v1 - v2 differences: * Updated changes to be protocol friendly * Updated block-commit tests to account for different error message wording * Updated block-commit tests to add relative backing filename tests * In bdrv_find_backing_image(), use g_malloc() instead of char arrays Jeff Cody (4

[Qemu-devel] [PATCH v2 3/4] qemu-iotests: qemu-io tests update for block-commit (040)

2012-10-16 Thread Jeff Cody
Some of the error messages put out by block-commit have changed slightly, which causes 2 tests cases for block-commit to fail. This patch updates the test cases to look for the correct error output. Signed-off-by: Jeff Cody jc...@redhat.com --- tests/qemu-iotests/040 | 4 ++-- 1 file changed, 2

[Qemu-devel] [PATCH v2 4/4] qemu-iotests: add relative backing file tests for block-commit (040)

2012-10-16 Thread Jeff Cody
The previous block commit used absolute filenames for all block-commit images and commands; this adds relative filenames for the same tests. Signed-off-by: Jeff Cody jc...@redhat.com --- tests/qemu-iotests/040 | 102 + tests/qemu-iotests/040.out

[Qemu-devel] [PATCH v2 1/4] block: make bdrv_find_backing_image compare canonical filenames

2012-10-16 Thread Jeff Cody
to the current image filename being searched, and then use realpath() to make all comparisons based on absolute filenames. This also changes bdrv_find_backing_image to no longer be recursive, but iterative. Signed-off-by: Jeff Cody jc...@redhat.com --- block.c | 64

[Qemu-devel] [PATCH v2 2/4] block: in commit, determine base image from the top image

2012-10-16 Thread Jeff Cody
it is reachable from top. Signed-off-by: Jeff Cody jc...@redhat.com --- block/commit.c | 9 - blockdev.c | 21 +++-- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/block/commit.c b/block/commit.c index 733c914..13d9e82 100644 --- a/block/commit.c +++ b

Re: [Qemu-devel] [PATCH v2 2/4] block: in commit, determine base image from the top image

2012-10-16 Thread Jeff Cody
On 10/16/2012 11:22 AM, Eric Blake wrote: On 10/16/2012 08:44 AM, Jeff Cody wrote: This simplifies some code and error checking, and also fixes a bug. bdrv_find_backing_image() should only be passed absolute filenames, or filenames relative to the chain. In the QMP message handler for block

Re: [Qemu-devel] [PATCH v2 1/4] block: make bdrv_find_backing_image compare canonical filenames

2012-10-16 Thread Jeff Cody
On 10/16/2012 11:12 AM, Eric Blake wrote: On 10/16/2012 08:44 AM, Jeff Cody wrote: Currently, bdrv_find_backing_image compares bs-backing_file with what is passed in as a backing_file name. Mismatches may occur, however, when bs-backing_file and backing_file are both not Reads better as s

[Qemu-devel] [PATCH v3 0/4] block-commit fixes

2012-10-16 Thread Jeff Cody
to add relative backing filename tests * In bdrv_find_backing_image(), use g_malloc() instead of char arrays Jeff Cody (4): block: make bdrv_find_backing_image compare canonical filenames block: in commit, determine base image from the top image qemu-iotests: qemu-io tests update for block

[Qemu-devel] [PATCH v3 1/4] block: make bdrv_find_backing_image compare canonical filenames

2012-10-16 Thread Jeff Cody
be recursive, but iterative. Signed-off-by: Jeff Cody jc...@redhat.com --- block.c | 60 ++-- 1 file changed, 54 insertions(+), 6 deletions(-) diff --git a/block.c b/block.c index e95f613..5e7fc9e 100644 --- a/block.c +++ b/block.c @@ -3123,22 +3123,70

[Qemu-devel] [PATCH v3 2/4] block: in commit, determine base image from the top image

2012-10-16 Thread Jeff Cody
it is reachable from top. Signed-off-by: Jeff Cody jc...@redhat.com --- block/commit.c | 9 - blockdev.c | 21 +++-- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/block/commit.c b/block/commit.c index 733c914..13d9e82 100644 --- a/block/commit.c +++ b

[Qemu-devel] [PATCH v3 4/4] qemu-iotests: add relative backing file tests for block-commit (040)

2012-10-16 Thread Jeff Cody
The previous block commit used absolute filenames for all block-commit images and commands; this adds relative filenames for the same tests. Signed-off-by: Jeff Cody jc...@redhat.com --- tests/qemu-iotests/040 | 102 + tests/qemu-iotests/040.out

[Qemu-devel] [PATCH v3 3/4] qemu-iotests: qemu-io tests update for block-commit (040)

2012-10-16 Thread Jeff Cody
Some of the error messages put out by block-commit have changed slightly, which causes 2 tests cases for block-commit to fail. This patch updates the test cases to look for the correct error output. Signed-off-by: Jeff Cody jc...@redhat.com --- tests/qemu-iotests/040 | 4 ++-- 1 file changed, 2

[Qemu-devel] [PATCH v2 0/5] Initial VHDX support

2013-04-23 Thread Jeff Cody
') * .bdrv_create() * write operations other than to the header Jeff Cody (5): qemu: add castagnoli crc32c checksum algorithm block: vhdx header for the QEMU support of VHDX images block: initial VHDX driver support framework - supports open and probe block: add read-only support to VHDX image

[Qemu-devel] [PATCH v2 5/5] block: add header update capability for VHDX images.

2013-04-23 Thread Jeff Cody
Signed-off-by: Jeff Cody jc...@redhat.com --- block/Makefile.objs | 2 +- block/vhdx.c| 157 +++- configure | 13 + 3 files changed, 169 insertions(+), 3 deletions(-) diff --git a/block/Makefile.objs b/block/Makefile.objs

[Qemu-devel] [PATCH v2 1/5] qemu: add castagnoli crc32c checksum algorithm

2013-04-23 Thread Jeff Cody
Codes with 24 and 32 Parity Bits, IEEE Transactions on Communication, Volume 41, Number 6, June 1993 Signed-off-by: Jeff Cody jc...@redhat.com --- include/qemu/crc32c.h | 35 +++ util/Makefile.objs| 1 + util/crc32c.c | 115

[Qemu-devel] [PATCH v2 3/5] block: initial VHDX driver support framework - supports open and probe

2013-04-23 Thread Jeff Cody
) - log replay / dirty logs (only clean images) This is based on Microsoft's VHDX specification: VHDX Format Specification v0.95, published 4/12/2012 https://www.microsoft.com/en-us/download/details.aspx?id=29681 Signed-off-by: Jeff Cody jc...@redhat.com --- block/Makefile.objs | 1

[Qemu-devel] [PATCH v2 2/5] block: vhdx header for the QEMU support of VHDX images

2013-04-23 Thread Jeff Cody
-off-by: Jeff Cody jc...@redhat.com --- block/vhdx.h | 327 +++ 1 file changed, 327 insertions(+) create mode 100644 block/vhdx.h diff --git a/block/vhdx.h b/block/vhdx.h new file mode 100644 index 000..f5cf1ed --- /dev/null +++ b/block

[Qemu-devel] [PATCH v2 4/5] block: add read-only support to VHDX image format.

2013-04-23 Thread Jeff Cody
=on' in the drive image options from the QEMU commandline. Signed-off-by: Jeff Cody jc...@redhat.com --- block/vhdx.c | 123 ++- 1 file changed, 121 insertions(+), 2 deletions(-) diff --git a/block/vhdx.c b/block/vhdx.c index b0ea2ba..ca4a298 100644

Re: [Qemu-devel] [PATCH v2 3/5] block: initial VHDX driver support framework - supports open and probe

2013-04-23 Thread Jeff Cody
On Tue, Apr 23, 2013 at 05:46:28PM +0200, Kevin Wolf wrote: Am 23.04.2013 um 16:24 hat Jeff Cody geschrieben: This is the initial block driver framework for VHDX image support ( i.e. Hyper-V image file formats), that supports opening VHDX files, and parsing the headers. This commit

Re: [Qemu-devel] [PATCH v2 2/5] block: vhdx header for the QEMU support of VHDX images

2013-04-23 Thread Jeff Cody
On Tue, Apr 23, 2013 at 05:10:18PM +0200, Kevin Wolf wrote: Am 23.04.2013 um 16:24 hat Jeff Cody geschrieben: This is based on Microsoft's VHDX specification: VHDX Format Specification v0.95, published 4/12/2012 https://www.microsoft.com/en-us/download/details.aspx?id=29681

[Qemu-devel] [PATCH] block: add bdrv_reopen() support for raw hdev devices

2012-11-19 Thread Jeff Cody
The host device reopen handler for raw-posix is the same as the file reopen handler. Signed-off-by: Jeff Cody jc...@redhat.com --- block/raw-posix.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/raw-posix.c b/block/raw-posix.c index f2f0404..c7061e6 100644 --- a/block/raw-posix.c

Re: [Qemu-devel] [PATCH] block: add bdrv_reopen() support for raw hdev devices

2012-11-19 Thread Jeff Cody
On 11/19/2012 10:45 AM, Kevin Wolf wrote: Am 19.11.2012 16:37, schrieb Jeff Cody: The host device reopen handler for raw-posix is the same as the file reopen handler. What about host_floppy and (twice) host_cdrom? Kevin Do we need / want reopen for floppy and/or cdrom?

[Qemu-devel] [PATCH v2] block: add bdrv_reopen() support for raw hdev, floppy, and cdrom

2012-11-20 Thread Jeff Cody
For hdev, floppy, and cdrom, the reopen() handlers are the same as for the file reopen handler. For floppy and cdrom types, however, we keep O_NONBLOCK, as in the _open function. Signed-off-by: Jeff Cody jc...@redhat.com --- block/raw-posix.c | 16 1 file changed, 16 insertions

Re: [Qemu-devel] [PATCH for 1.4] block/vpc: Fix size calculation

2013-02-08 Thread Jeff Cody
On Fri, Feb 08, 2013 at 09:38:47AM +0100, Kevin Wolf wrote: Am 07.02.2013 20:26, schrieb Stefan Weil: From: Stefan Weil stefan@kiwi.(none) The size calculated from the CHS values is not the real image (disk) size, but usually a smaller value. This is caused by rounding effects. Only

Re: [Qemu-devel] [PATCH for 1.4] block/vpc: Fix size calculation

2013-02-11 Thread Jeff Cody
On Mon, Feb 11, 2013 at 09:54:56AM +0100, Kevin Wolf wrote: Am 08.02.2013 18:43, schrieb Stefan Weil: Am 08.02.2013 13:14, schrieb Jeff Cody: On Fri, Feb 08, 2013 at 09:38:47AM +0100, Kevin Wolf wrote: Am 07.02.2013 20:26, schrieb Stefan Weil: From: Stefan Weil stefan@kiwi.(none

Re: [Qemu-devel] [PATCH for 1.4] block/vpc: Fix size calculation

2013-02-11 Thread Jeff Cody
On Mon, Feb 11, 2013 at 09:09:48PM +0100, Kevin Wolf wrote: Am 11.02.2013 20:38, schrieb Jeff Cody: I've done some testing back and forth between VPC, Win Server 2012 Hyper-V, and qemu/kvm with and without this patch applied. First of all, thanks a lot for doing all the testing

Re: [Qemu-devel] [PATCH for 1.4] block/vpc: Fix size calculation

2013-02-11 Thread Jeff Cody
On Mon, Feb 11, 2013 at 03:14:36PM -0600, Anthony Liguori wrote: Paolo Bonzini pbonz...@redhat.com writes: Il 11/02/2013 21:13, Anthony Liguori ha scritto: Applied. Thanks. Regards, Anthony Liguori I guess this was a mistake, please revert. No, it wasn't. The patch was

Re: [Qemu-devel] [PATCH for 1.4] block/vpc: Fix size calculation

2013-02-11 Thread Jeff Cody
On Mon, Feb 11, 2013 at 10:33:53PM +0100, Stefan Weil wrote: Am 11.02.2013 20:38, schrieb Jeff Cody: I've done some testing back and forth between VPC, Win Server 2012 Hyper-V, and qemu/kvm with and without this patch applied. The short: this patch will break Virtual PC VHD compatibility

Re: [Qemu-devel] [PATCH for 1.4] block/vpc: Fix size calculation

2013-02-12 Thread Jeff Cody
On Tue, Feb 12, 2013 at 03:47:38PM +0100, Stefan Weil wrote: Am 11.02.2013 22:20, schrieb Jeff Cody: On Mon, Feb 11, 2013 at 03:14:36PM -0600, Anthony Liguori wrote: Paolo Bonzini pbonz...@redhat.com writes: Il 11/02/2013 21:13, Anthony Liguori ha scritto: Applied. Thanks. Regards

[Qemu-devel] [RFC PATCH 0/4] VHDX Read support

2013-02-18 Thread Jeff Cody
(e.g. region / metdata handling) Any comments are welcome Jeff Cody (4): qemu: add castagnoli crc32c checksum algorithm block: vhdx header for the QEMU support of VHDX images block: VHDX block driver support block: add vhdx to Makefile.obj for compile block/Makefile.objs | 1 + block

[Qemu-devel] [RFC PATCH 1/4] qemu: add castagnoli crc32c checksum algorithm

2013-02-18 Thread Jeff Cody
Codes with 24 and 32 Parity Bits, IEEE Transactions on Communication, Volume 41, Number 6, June 1993 Signed-off-by: Jeff Cody jc...@redhat.com --- include/qemu/crc32c.h | 35 +++ util/Makefile.objs| 1 + util/crc32c.c | 115

[Qemu-devel] [RFC PATCH 2/4] block: vhdx header for the QEMU support of VHDX images

2013-02-18 Thread Jeff Cody
, to reduce alignment issues on different architectures. Per the specification, all data is little-endian. Signed-off-by: Jeff Cody jc...@redhat.com --- block/vhdx.h | 349 +++ 1 file changed, 349 insertions(+) create mode 100644 block/vhdx.h diff

[Qemu-devel] [RFC PATCH 4/4] block: add vhdx to Makefile.obj for compile

2013-02-18 Thread Jeff Cody
Signed-off-by: Jeff Cody jc...@redhat.com --- block/Makefile.objs | 1 + 1 file changed, 1 insertion(+) diff --git a/block/Makefile.objs b/block/Makefile.objs index c067f38..a819577 100644 --- a/block/Makefile.objs +++ b/block/Makefile.objs @@ -2,6 +2,7 @@ block-obj-y += raw.o cow.o qcow.o

[Qemu-devel] [RFC PATCH 3/4] block: VHDX block driver support

2013-02-18 Thread Jeff Cody
and files read. As this is still under active development, and an RFC, you can assume that any debug print statements will be removed prior to formal patch submission. Signed-off-by: Jeff Cody jc...@redhat.com --- block/vhdx.c | 814 +++ 1

Re: [Qemu-devel] [RFC PATCH 0/4] VHDX Read support

2013-02-18 Thread Jeff Cody
On Mon, Feb 18, 2013 at 06:03:28PM -0500, Jeff Cody wrote: This is preliminary support for VHDX images, based on the spec: VHDX Format Specification v0.95, published 4/12/2012 https://www.microsoft.com/en-us/download/details.aspx?id=29681 My working git repo for this work is: https

Re: [Qemu-devel] [RFC PATCH 2/4] block: vhdx header for the QEMU support of VHDX images

2013-02-19 Thread Jeff Cody
On Tue, Feb 19, 2013 at 10:02:51AM +0100, Stefan Hajnoczi wrote: On Mon, Feb 18, 2013 at 06:03:30PM -0500, Jeff Cody wrote: +/* the guid is a 16 byte unique ID - the definition for this used by + * Microsoft is not just 16 bytes though - it is a structure that is defined, + * so we need

Re: [Qemu-devel] [RFC PATCH 3/4] block: VHDX block driver support

2013-02-19 Thread Jeff Cody
On Tue, Feb 19, 2013 at 10:20:40AM +0100, Stefan Hajnoczi wrote: On Mon, Feb 18, 2013 at 06:03:31PM -0500, Jeff Cody wrote: This is preliminary and beta support for the VHDX image format, as specified in: VHDX Format Specification v0.95, published 4/12/2012 https

Re: [Qemu-devel] [RFC PATCH 3/4] block: VHDX block driver support

2013-02-19 Thread Jeff Cody
On Tue, Feb 19, 2013 at 03:30:10PM +0100, Kevin Wolf wrote: On Tue, Feb 19, 2013 at 08:26:35AM -0500, Jeff Cody wrote: On Tue, Feb 19, 2013 at 10:20:40AM +0100, Stefan Hajnoczi wrote: On Mon, Feb 18, 2013 at 06:03:31PM -0500, Jeff Cody wrote: +#include qemu/crc32c.h +#include block

Re: [Qemu-devel] [RFC PATCH 3/4] block: VHDX block driver support

2013-02-19 Thread Jeff Cody
On Tue, Feb 19, 2013 at 03:57:53PM +0100, Kevin Wolf wrote: On Mon, Feb 18, 2013 at 06:03:31PM -0500, Jeff Cody wrote: This is preliminary and beta support for the VHDX image format, as specified in: VHDX Format Specification v0.95, published 4/12/2012 https://www.microsoft.com/en

Re: [Qemu-devel] [RFC PATCH 2/4] block: vhdx header for the QEMU support of VHDX images

2013-02-19 Thread Jeff Cody
On Tue, Feb 19, 2013 at 02:55:23PM +0100, Stefan Hajnoczi wrote: On Tue, Feb 19, 2013 at 08:11:48AM -0500, Jeff Cody wrote: On Tue, Feb 19, 2013 at 10:02:51AM +0100, Stefan Hajnoczi wrote: On Mon, Feb 18, 2013 at 06:03:30PM -0500, Jeff Cody wrote: +/* Individual region table entry

Re: [Qemu-devel] [RFC PATCH 4/4] block: add vhdx to Makefile.obj for compile

2013-02-19 Thread Jeff Cody
On Tue, Feb 19, 2013 at 03:23:35PM +0100, Kevin Wolf wrote: On Mon, Feb 18, 2013 at 06:03:32PM -0500, Jeff Cody wrote: Signed-off-by: Jeff Cody jc...@redhat.com --- block/Makefile.objs | 1 + 1 file changed, 1 insertion(+) diff --git a/block/Makefile.objs b/block/Makefile.objs

Re: [Qemu-devel] 'commit' error for 'all': No medium found

2013-02-25 Thread Jeff Cody
On Sun, Feb 24, 2013 at 07:29:31PM +0100, Jan Kiszka wrote: Hi, I'm seeing this with git head and 1.4. Apparently, commit on a non-populated medium now generates this error instead of ignoring it like in the past. As we stop iterating over the block devices while doing all, this may leaving

Re: [Qemu-devel] 'commit' error for 'all': No medium found

2013-02-25 Thread Jeff Cody
On Mon, Feb 25, 2013 at 03:30:34PM +0100, Markus Armbruster wrote: Jan Kiszka jan.kis...@siemens.com writes: On 2013-02-25 14:05, Jeff Cody wrote: On Sun, Feb 24, 2013 at 07:29:31PM +0100, Jan Kiszka wrote: Hi, I'm seeing this with git head and 1.4. Apparently, commit on a non

Re: [Qemu-devel] [PATCH v2 2/5] block: vhdx header for the QEMU support of VHDX images

2013-04-24 Thread Jeff Cody
On Wed, Apr 24, 2013 at 02:31:27PM +0200, Stefan Hajnoczi wrote: On Tue, Apr 23, 2013 at 10:24:21AM -0400, Jeff Cody wrote: +/* HEADER SECTION STRUCTURES */ + +/* Important note: these structures are as defined in the VHDX specification, + * including byte order and size

Re: [Qemu-devel] [PATCH v2 3/5] block: initial VHDX driver support framework - supports open and probe

2013-04-24 Thread Jeff Cody
On Wed, Apr 24, 2013 at 03:21:10PM +0200, Stefan Hajnoczi wrote: On Tue, Apr 23, 2013 at 10:24:22AM -0400, Jeff Cody wrote: +if (!vhdx_checksum_is_valid(buffer, VHDX_HEADER_BLOCK_SIZE, 4) || +s-rt.signature != VHDX_RT_MAGIC) { +ret = -EINVAL; +goto fail

Re: [Qemu-devel] [PATCH v2 5/5] block: add header update capability for VHDX images.

2013-04-24 Thread Jeff Cody
On Wed, Apr 24, 2013 at 04:47:15PM +0200, Stefan Hajnoczi wrote: On Tue, Apr 23, 2013 at 10:24:24AM -0400, Jeff Cody wrote: This adds the ability to update the headers in a VHDX image, including generating a new MS-compatible GUID. As VHDX depends on uuid.h, VHDX is now a configurable

Re: [Qemu-devel] [PATCH v2 2/5] block: vhdx header for the QEMU support of VHDX images

2013-04-25 Thread Jeff Cody
On Thu, Apr 25, 2013 at 03:05:37PM +0200, Kevin Wolf wrote: Am 23.04.2013 um 16:24 hat Jeff Cody geschrieben: This is based on Microsoft's VHDX specification: VHDX Format Specification v0.95, published 4/12/2012 https://www.microsoft.com/en-us/download/details.aspx?id=29681

Re: [Qemu-devel] [PATCH v2 3/5] block: initial VHDX driver support framework - supports open and probe

2013-04-25 Thread Jeff Cody
On Thu, Apr 25, 2013 at 03:04:23PM +0200, Kevin Wolf wrote: Am 23.04.2013 um 16:24 hat Jeff Cody geschrieben: This is the initial block driver framework for VHDX image support ( i.e. Hyper-V image file formats), that supports opening VHDX files, and parsing the headers. This commit

Re: [Qemu-devel] [PATCH v2 5/5] block: add header update capability for VHDX images.

2013-04-29 Thread Jeff Cody
On Sun, Apr 28, 2013 at 06:05:53PM +0800, Fam Zheng wrote: On Tue, 04/23 10:24, Jeff Cody wrote: if (flags BDRV_O_RDWR) { -ret = -ENOTSUP; -goto fail; +vhdx_update_headers(bs, s, false); Do we really have to update the header immediately on RW open? I

Re: [Qemu-devel] [PATCH v2 3/5] block: initial VHDX driver support framework - supports open and probe

2013-04-29 Thread Jeff Cody
On Sun, Apr 28, 2013 at 05:58:55PM +0800, Fam Zheng wrote: On Tue, 04/23 10:24, Jeff Cody wrote: +/* opens the specified header block from the VHDX file header section */ +static int vhdx_parse_header(BlockDriverState *bs, BDRVVHDXState *s) +{ +int ret = 0; +vhdx_header *header1

Re: [Qemu-devel] [PATCH v2 3/5] block: initial VHDX driver support framework - supports open and probe

2013-04-29 Thread Jeff Cody
On Sun, Apr 28, 2013 at 03:29:14PM +0800, Fam Zheng wrote: +static void cpu_to_leguids(ms_guid *guid) +{ +cpu_to_le32s(guid-data1); +cpu_to_le16s(guid-data2); +cpu_to_le16s(guid-data3); +} This one seems used in 5/5 only, so this patch fails compiling (defined but not

[Qemu-devel] [PATCH v3 1/4] qemu: add castagnoli crc32c checksum algorithm

2013-04-29 Thread Jeff Cody
Codes with 24 and 32 Parity Bits, IEEE Transactions on Communication, Volume 41, Number 6, June 1993 Signed-off-by: Jeff Cody jc...@redhat.com --- include/qemu/crc32c.h | 35 +++ util/Makefile.objs| 1 + util/crc32c.c | 115

[Qemu-devel] [PATCH v3 0/4] Initial VHDX support

2013-04-29 Thread Jeff Cody
, the following is not yet supported: * Differencing files * Log replay (so we will refuse to open any images that are not 'clean') * .bdrv_create() * write operations other than to the header Jeff Cody (4): qemu: add castagnoli crc32c checksum algorithm block: vhdx header

[Qemu-devel] [PATCH v3 3/4] block: initial VHDX driver support framework - supports open and probe

2013-04-29 Thread Jeff Cody
) - log replay / dirty logs (only clean images) This is based on Microsoft's VHDX specification: VHDX Format Specification v0.95, published 4/12/2012 https://www.microsoft.com/en-us/download/details.aspx?id=29681 Signed-off-by: Jeff Cody jc...@redhat.com --- block/Makefile.objs | 1

[Qemu-devel] [PATCH v3 2/4] block: vhdx header for the QEMU support of VHDX images

2013-04-29 Thread Jeff Cody
-off-by: Jeff Cody jc...@redhat.com --- block/vhdx.h | 311 +++ 1 file changed, 311 insertions(+) create mode 100644 block/vhdx.h diff --git a/block/vhdx.h b/block/vhdx.h new file mode 100644 index 000..fcddd37 --- /dev/null +++ b/block

[Qemu-devel] [PATCH v3 4/4] block: add read-only support to VHDX image format.

2013-04-29 Thread Jeff Cody
=on' in the drive image options from the QEMU commandline. Signed-off-by: Jeff Cody jc...@redhat.com --- block/vhdx.c | 123 ++- 1 file changed, 121 insertions(+), 2 deletions(-) diff --git a/block/vhdx.c b/block/vhdx.c index 0ee10a7..e9704b1 100644

Re: [Qemu-devel] [PATCH v3 0/4] Initial VHDX support

2013-05-01 Thread Jeff Cody
On Wed, May 01, 2013 at 02:43:04PM +0200, Stefan Hajnoczi wrote: On Mon, Apr 29, 2013 at 02:48:15PM -0400, Jeff Cody wrote: Differences from v2: Patch 2/4: changed 2 uint8_t[16] to MSGUID (Kevin) renamed all strucs to proper style (Kevin) indentations

Re: [Qemu-devel] [PATCH 2/3] qemu-iotests: exclude vmdk from 043

2013-05-07 Thread Jeff Cody
+_supported_fmt qcow qcow2 qed _supported_proto generic _supported_os Linux -- 1.8.1.4 Reviewed-by: Jeff Cody jc...@redhat.com

Re: [Qemu-devel] [PATCH 1/3] qemu-iotests: exclude vmdk for test 042

2013-05-07 Thread Jeff Cody
2 3 15 . ./common.rc . ./common.filter -_supported_fmt qcow2 qcow qed vmdk +_supported_fmt qcow2 qcow qed _supported_proto file _supported_os Linux -- 1.8.1.4 Reviewed-by: Jeff Cody jc...@redhat.com

Re: [Qemu-devel] [PATCH 3/3] qemu-iotests: fix 017 018 for vmdk

2013-05-07 Thread Jeff Cody
On Tue, May 07, 2013 at 07:13:05PM +0800, Fam Zheng wrote: 017 and 018 use /bin/mv to move base img from t.IMGFMG to t.IMGFMT.base after filling data, this is not enough for vmdk, when t.IMGFMT is only a description text file who points to t-{flat,s001,f001,...}.IMGFMT as data extent, so

Re: [Qemu-devel] [PATCH V18 5/6] add-cow file format core code.

2013-05-13 Thread Jeff Cody
On Wed, Apr 10, 2013 at 04:11:52PM +0800, Dong Xu Wang wrote: add-cow file format core code. It use block-cache.c as cache code. It lacks of snapshot_blkdev support. Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com --- v17-v18: 1) use error_report, not fprintf. 2) remove version

Re: [Qemu-devel] qemu-ga command listing

2013-01-02 Thread Jeff Cody
On Mon, Dec 31, 2012 at 01:41:57PM -0700, Eric Blake wrote: Is there a guest-agent command for querying the list of available commands for a given guest agent? If not, should there be? In other words, I'm looking for the counterpart to QMP {execute:query-commands}. Hi Eric, There is

[Qemu-devel] [PATCH] block: fix null-pointer bug on error case in block commit

2013-01-15 Thread Jeff Cody
it is needed, and check for NULL before restoring the flags. Also get rid of the unneeded parameter initialization. Reported-By: Markus Armbruster arm...@redhat.com Signed-off-by: Jeff Cody jc...@redhat.com --- block/commit.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/block

[Qemu-devel] [PATCH] block: do_commit() does not pass along error messages for all errors

2013-01-16 Thread Jeff Cody
the appropriate error messages for the errors explicitely returned by bdrv_commit(). Signed-off-by: Jeff Cody jc...@redhat.com --- blockdev.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/blockdev.c b/blockdev.c index d724e2d..7db7d8e 100644 --- a/blockdev.c +++ b/blockdev.c @@ -657,6

Re: [Qemu-devel] [PATCH] block: do_commit() does not pass along error messages for all errors

2013-01-18 Thread Jeff Cody
On Thu, Jan 17, 2013 at 09:57:28AM -0200, Luiz Capitulino wrote: On Thu, 17 Jan 2013 08:49:38 +0100 Markus Armbruster arm...@redhat.com wrote: [Cc: Luiz for error stuff] Jeff Cody jc...@redhat.com writes: The non-live bdrv_commit() function may return one of the following

[Qemu-devel] [PATCH v2] block: do_commit() does not pass along error messages for all errors

2013-01-18 Thread Jeff Cody
monitor_printf() and strerror(), and covert existing qerror_report() calls in do_commit() to use monitor_printf(). Signed-off-by: Jeff Cody jc...@redhat.com --- blockdev.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/blockdev.c b/blockdev.c index d724e2d..cb3b426 100644

[Qemu-devel] [PATCH v3] block: Monitor command commit neglects to report some errors

2013-01-18 Thread Jeff Cody
monitor_printf() and strerror(), and convert existing qerror_report() calls in do_commit() to monitor_printf(). Signed-off-by: Jeff Cody jc...@redhat.com --- blockdev.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/blockdev.c b/blockdev.c index d724e2d..cb3b426 100644

Re: [Qemu-devel] [PATCH v2] block: do_commit() does not pass along error messages for all errors

2013-01-18 Thread Jeff Cody
On Fri, Jan 18, 2013 at 06:11:25PM +0100, Markus Armbruster wrote: Jeff Cody jc...@redhat.com writes: The non-live bdrv_commit() function may return one of the following errors: -ENOTSUP, -EBUSY, -EACCES, -EIO. The only error that is checked in the HMP handler is -EBUSY, so the monitor

Re: [Qemu-devel] [Bug 1105670] [NEW] Converting vpc image to raw results in an image that is smaller than it should be.

2013-02-01 Thread Jeff Cody
On Wed, Jan 30, 2013 at 10:24:44AM +0100, Stefan Hajnoczi wrote: On Sat, Jan 26, 2013 at 03:21:27AM -, Peter Rehley wrote: Public bug reported: CCed Stefan Weil and Jeff Cody who may be thoughts on this bug. If you would like to contribute your patch, please see http://wiki.qemu.org

Re: [Qemu-devel] [Bug 1105670] [NEW] Converting vpc image to raw results in an image that is smaller than it should be.

2013-02-01 Thread Jeff Cody
On Fri, Feb 01, 2013 at 07:04:36PM +0100, Stefan Weil wrote: Am 01.02.2013 18:48, schrieb Jeff Cody: On Wed, Jan 30, 2013 at 10:24:44AM +0100, Stefan Hajnoczi wrote: On Sat, Jan 26, 2013 at 03:21:27AM -, Peter Rehley wrote: Public bug reported: CCed Stefan Weil and Jeff Cody who may

Re: [Qemu-devel] [PATCH 4/7] block/vpc: Improve vpc_open (optimisation and error handling)

2013-02-04 Thread Jeff Cody
On Fri, Feb 01, 2013 at 10:51:31PM +0100, Stefan Weil wrote: * Always read the footer at the end of the image. The footer exists for all kinds of VHD images, so there is no need to read its copy at the start of dynamic VHD images. * Return error codes from bdrv_pread like in other block

Re: [Qemu-devel] [PATCH 5/7] block/vpc: Fix size calculation

2013-02-05 Thread Jeff Cody
On Tue, Feb 05, 2013 at 12:35:49PM +0100, Kevin Wolf wrote: Am 05.02.2013 12:10, schrieb Stefan Weil: Am 05.02.2013 11:54, schrieb Kevin Wolf: Am 01.02.2013 22:51, schrieb Stefan Weil: The size calculated from the CHS values is not the real image (disk) size, but usually a smaller value

[Qemu-devel] [PATCH] block: for HMP commit() operations on 'all', skip non-COW drives

2013-02-26 Thread Jeff Cody
error (-ENOMEDIUM if eject / not present, -ENOTSUP if no backing file). Reported-by: Jan Kiszka jan.kis...@web.de Signed-off-by: Jeff Cody jc...@redhat.com --- block.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/block.c b/block.c index 50dab8e..7a105dc 100644

[Qemu-devel] [PATCH 0/7] Initial VHDX support (and a bug fix for QCOW)

2013-03-06 Thread Jeff Cody
will refuse to open any images that are not 'clean') * .bdrv_create() This series, and additional work to add in the above features, may be found at: https://github.com/codyprime/qemu-kvm-jtc/tree/jtc-vhdx-v1 git://github.com/codyprime/qemu-kvm-jtc.git, branch jtc-vhdx-v1 Jeff Cody (7): block

<    1   2   3   4   5   6   7   8   9   10   >