[Qemu-devel] [PATCH v8 08/19] block: vhdx - log parsing, replay, and flush support

2013-10-30 Thread Jeff Cody
log. Each log entry must match the file log GUID in order to be valid (along with other criteria). Once we have flushed all valid log entries, we marked the file log GUID to be zero, which indicates a buffer with no valid entries. Signed-off-by: Jeff Cody --- block/Makefile.objs | 2 +- b

[Qemu-devel] [PATCH v8 10/19] block: vhdx - add log write support

2013-10-30 Thread Jeff Cody
updated in the header. Signed-off-by: Jeff Cody --- block/vhdx-log.c | 282 +++ block/vhdx.h | 3 + 2 files changed, 285 insertions(+) diff --git a/block/vhdx-log.c b/block/vhdx-log.c index 0284729..ee5583c 100644 --- a/block/vhdx-log.c

[Qemu-devel] [PATCH v8 05/19] block: vhdx - break endian translation functions out

2013-10-30 Thread Jeff Cody
This moves the endian translation functions out from the vhdx.c source, into a separate source file. In addition to the previously defined endian functions, new endian translation functions for log support are added as well. Signed-off-by: Jeff Cody --- block/Makefile.objs | 2 +- block/vhdx

[Qemu-devel] [PATCH v8 14/19] block: vhdx - break out code operations to functions

2013-10-30 Thread Jeff Cody
This is preperation for vhdx_create(). The ability to write headers, and calculate the number of BAT entries will be needed within the create() functions, so move this relevant code into helper functions. Signed-off-by: Jeff Cody --- block/vhdx.c | 121

[Qemu-devel] [PATCH v8 16/19] block: vhdx - add .bdrv_create() support

2013-10-30 Thread Jeff Cody
--- ~ ~ ~ ---. | (F) | (G) |(H)| | Journal Log | BAT / Bitmap | Metadata | data .. | | | | . ~ --- ~ ~ ~ ---. 1MB (var.)

[Qemu-devel] [PATCH v8 13/19] block: vhdx - move more endian translations to vhdx-endian.c

2013-10-30 Thread Jeff Cody
In preparation for vhdx_create(), move more endian translation functions out to vhdx-endian.c. Signed-off-by: Jeff Cody --- block/vhdx-endian.c | 75 + block/vhdx.c| 20 +++--- block/vhdx.h| 9 ++- 3 files changed

[Qemu-devel] [PATCH v8 19/19] block: vhdx qemu-iotest - log replay of data sector

2013-10-30 Thread Jeff Cody
file, post log replay, matched. Signed-off-by: Jeff Cody --- tests/qemu-iotests/068 | 67 + tests/qemu-iotests/068.out | 8 +++ tests/qemu-iotests/group | 1 + .../sample_images/iotest-dirtylog-10G

[Qemu-devel] [PATCH v8 12/19] block: vhdx - remove BAT file offset bit shifting

2013-10-30 Thread Jeff Cody
true uint64_t file offset. This replaces those steps with just a bit mask, to get rid of the lower 20 bits instead. Signed-off-by: Jeff Cody --- block/vhdx.c | 6 ++ block/vhdx.h | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/block/vhdx.c b/block/vhdx.c index 050f071

[Qemu-devel] [PATCH v8 18/19] block: qemu-iotests for vhdx, add write test support

2013-10-30 Thread Jeff Cody
This removes the IMGFMT_GENERIC blocker for read-only, so existing iotests run read/write tests for vhdx images created by qemu-img (e.g. tests 001, 002, 003). In addition, this updates the sample image test for the Hyper-V created image, to verify we can write it as well. Signed-off-by: Jeff

[Qemu-devel] [PATCH v8 15/19] block: vhdx - fix comment typos in header, fix incorrect struct fields

2013-10-30 Thread Jeff Cody
wording in comments, and those have been fixed up as well. Signed-off-by: Jeff Cody --- block/vhdx.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/block/vhdx.h b/block/vhdx.h index 15486c7..f222d18 100644 --- a/block/vhdx.h +++ b/block/vhdx.h @@ -58,7 +58,7 @@ typedef

[Qemu-devel] [PATCH v8 17/19] block: vhdx - update _make_test_img() to filter out vhdx options

2013-10-30 Thread Jeff Cody
The non-global option output is suppresed in _make_test_img() for output verification in the 0?? tests. This adds suppression for the vhdx-unique options as well. This allows check -vhdx to run successfully. Signed-off-by: Jeff Cody --- tests/qemu-iotests/common.rc | 5 - 1 file changed

[Qemu-devel] [PATCH v8 11/19] block: vhdx write support

2013-10-30 Thread Jeff Cody
This adds support for writing to VHDX image files, using coroutines. Writes into the BAT table goes through the VHDX log. Currently, BAT table writes occur when expanding a dynamic VHDX file, and allocating a new BAT entry. Signed-off-by: Jeff Cody --- block/vhdx.c | 212

[Qemu-devel] [PATCH v8 09/19] block: vhdx - add region overlap detection for image files

2013-10-30 Thread Jeff Cody
about, but are not required). This adds the capability to register a region for later checking, and to check against registered regions for any overlap. Also, if neither the BAT or Metadata region tables are found, return error. Signed-off-by: Jeff Cody --- block/vhdx.c | 82

[Qemu-devel] [PATCH v8 07/19] block: vhdx code movement - move vhdx_close() above vhdx_open()

2013-10-30 Thread Jeff Cody
Signed-off-by: Jeff Cody --- block/vhdx.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/block/vhdx.c b/block/vhdx.c index 241703a..3f06ce3 100644 --- a/block/vhdx.c +++ b/block/vhdx.c @@ -778,6 +778,17 @@ exit: } +static void vhdx_close

[Qemu-devel] [PATCH 0/7] block: qemu-iotests, more quoting fixes

2013-10-31 Thread Jeff Cody
ail due to pathnames with spaces, and are not addressed in this series: 059, 067. Jeff Cody (7): block: qemu-iotests, add quotes to $TEST_IMG usage io pattern tests block: qemu-iotests, fix _make_test_img() to work with spaced pathnames block: qemu-iotests, add quotes to $TEST_IMG.base us

[Qemu-devel] [PATCH 4/7] block: qemu-iotests, add quotes to $TEST_IMG usage in 019

2013-10-31 Thread Jeff Cody
There were still instances of $TEST_IMG not being properly quoted. This was in the usage of a string built up for a 'for' loop; modify the loop so we can quote $TEST_IMG properly. Signed-off-by: Jeff Cody --- tests/qemu-iotests/019 | 6 +++--- 1 file changed, 3 insertions(+), 3

[Qemu-devel] [PATCH 2/7] block: qemu-iotests, fix _make_test_img() to work with spaced pathnames

2013-10-31 Thread Jeff Cody
_make_test_img() currently works with spaced pathnames only when not specifying a backing file. This fixes it so that the backing file argument is properly quoted. Signed-off-by: Jeff Cody --- tests/qemu-iotests/common.rc | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions

[Qemu-devel] [PATCH 3/7] block: qemu-iotests, add quotes to $TEST_IMG.base usage in 017

2013-10-31 Thread Jeff Cody
$TEST_IMG.base is used unquoted. Add quotes so that pathnames with spaces are supported. Signed-off-by: Jeff Cody --- tests/qemu-iotests/017 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/017 b/tests/qemu-iotests/017 index 45f2c0b..aba3faf 100755 --- a

[Qemu-devel] [PATCH 5/7] block: qemu-iotests, removes duplicate double quotes in 039

2013-10-31 Thread Jeff Cody
Test 039 had $TEST_IMG with duplicate double quotes - remove duplicate. Signed-off-by: Jeff Cody --- tests/qemu-iotests/039 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/039 b/tests/qemu-iotests/039 index f85b4ce..8bade92 100755 --- a/tests/qemu-iotests

[Qemu-devel] [PATCH 6/7] block: qemu-iotests, add quotes to $TEST_IMG usage for 051

2013-10-31 Thread Jeff Cody
There were still a couple of instances of unquoted usage of $TEST_IMG and $TEST_IMG.orig. Quoted these so they will not fail on pathnames with spaces in them. Signed-off-by: Jeff Cody --- tests/qemu-iotests/051 | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests

[Qemu-devel] [PATCH 7/7] block: qemu-iotests, add quotes to $TEST_IMG usage in 061

2013-10-31 Thread Jeff Cody
When creating images with backing files in the test, the backing file argument was not quoted properly. This caused the test to fail when run from a pathname with a space. Pass the backing argument in with the -b option to _make_test_img, so it can be properly quoted. Signed-off-by: Jeff Cody

[Qemu-devel] [PATCH 1/7] block: qemu-iotests, add quotes to $TEST_IMG usage io pattern tests

2013-10-31 Thread Jeff Cody
The usage of $TEST_IMG was not properly quoted everywhere in common.pattern. Signed-off-by: Jeff Cody --- tests/qemu-iotests/common.pattern | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/qemu-iotests/common.pattern b/tests/qemu-iotests/common.pattern

Re: [Qemu-devel] VHD suport in QEMU?

2013-11-01 Thread Jeff Cody
On Fri, Nov 01, 2013 at 06:04:19AM +0100, Philipp Hahn wrote: > Hello, > > sorry for high-jacking this thread, but I have a questing regarding VHD > (without the X): Xen-4.3 switched to upstream QEMUs support for VHD. The > dropped their own VHD implementation in blktap2, which supported backing

Re: [Qemu-devel] [PATCH v8 00/19] VHDX log replay and write support, .bdrv_create()

2013-11-01 Thread Jeff Cody
On Thu, Oct 31, 2013 at 02:10:48PM +0100, Stefan Hajnoczi wrote: > On Wed, Oct 30, 2013 at 10:44:37AM -0400, Jeff Cody wrote: > > This patch series contains the initial VHDX log parsing, replay, > > write support, and image creation. > > > > === v8 changes === >

Re: [Qemu-devel] [PATCH buildfix] block/gluster: Add missing argument to qemu_gluster_init() call

2014-03-04 Thread Jeff Cody
On Tue, Mar 04, 2014 at 09:12:14PM +0100, Stefan Hajnoczi wrote: > On Tue, Mar 4, 2014 at 9:00 PM, Andreas Färber wrote: > > Supply a required Error ** argument to qemu_gluster_init() in > > qemu_gluster_reopen_prepare(), as done in qemu_gluster_open(). > > > > Cc: Stefan Hajnoczi > > Signed-off-

[Qemu-devel] [PATCH] block: Explicitly specify 'unsigned long long' for VHDX 64-bit constants

2014-03-14 Thread Jeff Cody
On 32-bit hosts, some compilers will warn on too large integer constants for constants that are 64-bit in length. Explicitly put a 'ULL' suffix on those defines. Reported-by: Alexander Graf Signed-off-by: Jeff Cody --- block/vhdx.h | 6 +++--- 1 file changed, 3 insertions(+), 3

Re: [Qemu-devel] [PATCH] block: do not allow read-only=on and snapshot=on to be used together

2014-03-14 Thread Jeff Cody
On Wed, Mar 12, 2014 at 12:16:04PM +0100, Kevin Wolf wrote: > Am 24.01.2014 um 14:48 hat Jeff Cody geschrieben: > > On Fri, Jan 24, 2014 at 02:33:19PM +0100, Kevin Wolf wrote: > > > Am 14.01.2014 um 20:12 hat Jeff Cody geschrieben: > > > > Having both read-only=on and

[Qemu-devel] [PATCH 4/4] block: qemu-iotests: make test 019 and 086 work with spaced pathnames

2014-03-17 Thread Jeff Cody
Both tests 019 and 086 need proper quotations to work with pathnames that contain spaces. Signed-off-by: Jeff Cody --- tests/qemu-iotests/019 | 2 +- tests/qemu-iotests/086 | 8 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/qemu-iotests/019 b/tests/qemu-iotests

[Qemu-devel] [PATCH 0/4] Add common QEMU control functionality to qemu-iotests

2014-03-17 Thread Jeff Cody
This adds some common functionality to control QEMU for qemu-iotests. Additionally, test 085 is updated to use this new functionality. Some minor fixups along the way, to clear up spaced pathname issues, for common.rc, test 019, and test 086. Jeff Cody (4): block: qemu-iotests - add

[Qemu-devel] [PATCH 1/4] block: qemu-iotests - add common.qemu, for bash-controlled qemu tests

2014-03-17 Thread Jeff Cody
$2 is not seen in that time (anywhere in the response), then the test fails. Primarily used by _send_qemu_cmd, but could be useful standalone, as well. 4. _cleanup_qemu() Kills the running QEMU processes, and removes the fifos. Signed-off-by: Jeff Cody --- tests

[Qemu-devel] [PATCH 3/4] block: qemu-iotests - fix image cleanup when using spaced pathnames

2014-03-17 Thread Jeff Cody
The _rm_test_img() function in common.rc did not quote the image file, which left droppings in the scratch directory (and performed a potentially unsafe rm -f). This adds the necessary quotes. Signed-off-by: Jeff Cody --- tests/qemu-iotests/common.rc | 4 ++-- 1 file changed, 2 insertions

[Qemu-devel] [PATCH 2/4] block: qemu-iotests - update 085 to use common.qemu

2014-03-17 Thread Jeff Cody
The new functionality of common.qemu implements the QEMU control and communication functionality that was originally in test 085. This removes that now-duplicate functionality, and uses the common.qemu functions. Signed-off-by: Jeff Cody --- tests/qemu-iotests/085 | 73

Re: [Qemu-devel] [PATCH 1/4] block: qemu-iotests - add common.qemu, for bash-controlled qemu tests

2014-03-19 Thread Jeff Cody
On Wed, Mar 19, 2014 at 02:39:25PM +0100, Benoît Canet wrote: > The Monday 17 Mar 2014 à 21:24:37 (-0400), Jeff Cody wrote : > > This creates some common functions for bash language qemu-iotests > > to control, and communicate with, a running QEMU process. > > > >

Re: [Qemu-devel] [PATCH 1/4] block: qemu-iotests - add common.qemu, for bash-controlled qemu tests

2014-03-19 Thread Jeff Cody
On Wed, Mar 19, 2014 at 08:28:07AM -0600, Eric Blake wrote: > On 03/19/2014 08:19 AM, Jeff Cody wrote: > > >>> +then > >>> +_timed_wait_for ${h} "${@: -1}" > >> > >> You have done shift before this. Aren't ${*} the remai

Re: [Qemu-devel] [PATCH] iotests: Lower 064's memory usage

2015-01-23 Thread Jeff Cody
fset 268435456 > +128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) > +read 134217728/134217728 bytes at offset 402653184 > +128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) > +read 134217728/134217728 bytes at offset 536870912 > +128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) > +read 134217728/134217728 bytes at offset 671088640 > +128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) > +read 134217728/134217728 bytes at offset 805306368 > +128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) > +read 134217728/134217728 bytes at offset 939524096 > +128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) > read 60817408/60817408 bytes at offset 103809024 > 58 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) > *** done > -- > 2.1.0 > Reviewed-by: Jeff Cody

[Qemu-devel] [PATCH] block: fix off-by-one error in qcow and qcow2

2015-01-27 Thread Jeff Cody
This fixes an off-by-one error introduced in 9a29e18. Both qcow and qcow2 need to make sure to leave room for string terminator '\0' for the backing file, so the max length of the non-terminated string is either 1023 or PATH_MAX - 1. Reported-by: Kevin Wolf Signed-off-by: Jeff Cody

Re: [Qemu-devel] [RFC PATCH] vpc: Ignore geometry for large images

2015-02-10 Thread Jeff Cody
On Tue, Feb 10, 2015 at 02:34:14PM +0100, Kevin Wolf wrote: > Am 10.02.2015 um 12:41 hat Peter Lieven geschrieben: > > Am 09.02.2015 um 17:09 schrieb Kevin Wolf: > > >The CHS calculation as done per the VHD spec imposes a maximum > > >image size of ~127 GB. Real VHD images exist that are larger tha

Re: [Qemu-devel] [RFC PATCH] vpc: Ignore geometry for large images

2015-02-10 Thread Jeff Cody
On Tue, Feb 10, 2015 at 02:54:39PM +0100, Kevin Wolf wrote: > Am 10.02.2015 um 14:42 hat Jeff Cody geschrieben: > > On Tue, Feb 10, 2015 at 02:34:14PM +0100, Kevin Wolf wrote: > > > Am 10.02.2015 um 12:41 hat Peter Lieven geschrieben: > > > > Am 09.02.2015 um 17:09 sc

[Qemu-devel] [PATCH] block: vmdk - fixed sizeof() error

2015-02-10 Thread Jeff Cody
The size compared should be PATH_MAX, rather than sizeof(char *). Reported-by: Paolo Bonzini Signed-off-by: Jeff Cody --- block/vmdk.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index 7d079ad..8410a15 100644 --- a/block/vmdk.c +++ b/block

Re: [Qemu-devel] block-commit & dropping privs

2015-04-02 Thread Jeff Cody
On Thu, Apr 02, 2015 at 01:24:02PM +0200, Kevin Wolf wrote: > Am 02.04.2015 um 12:58 hat Michael Tokarev geschrieben: > > 01.04.2015 15:34, Kevin Wolf wrote: > > [] > > > Overriding the backing file should work like this: > > > > > > -drive file=...,backing.file.filename=/dev/fdset/2 > > > >

Re: [Qemu-devel] block-commit & dropping privs

2015-04-02 Thread Jeff Cody
On Thu, Apr 02, 2015 at 07:07:23AM -0600, Eric Blake wrote: > On 04/02/2015 06:04 AM, Michael Tokarev wrote: > > 02.04.2015 14:24, Kevin Wolf wrote: > > [] > >>> But overall, I think qemu-system should not modify backing > >>> file name in this case. > >> > >> So you would leave the backing file wi

Re: [Qemu-devel] block-commit & dropping privs

2015-04-03 Thread Jeff Cody
On Fri, Apr 03, 2015 at 01:49:01PM -0600, Eric Blake wrote: > On 04/02/2015 10:28 PM, Jeff Cody wrote: > > >> > >> Basically, once a commit crosses more than one file, all intermediate > >> files are useless and might as well be discarded. > > That's

Re: [Qemu-devel] [PATCH 4/4] block: vhdx - set .bdrv_has_zero_init to bdrv_has_zero_init_1

2014-12-23 Thread Jeff Cody
On Tue, Dec 23, 2014 at 05:07:16AM -0500, Lokesha, Amulya wrote: > > -Original Message- > From: Jeff Cody [mailto:jc...@redhat.com] > Sent: Wednesday, December 17, 2014 5:44 PM > To: Lokesha, Amulya > Cc: Max Reitz; qemu-devel@nongnu.org; kw...@redhat.com; stefa...@re

Re: [Qemu-devel] [Bug 1399191] [NEW] Large VHDX image size

2015-01-07 Thread Jeff Cody
On Wed, Jan 07, 2015 at 03:30:28PM +, Stefan Hajnoczi wrote: > On Thu, Dec 04, 2014 at 01:31:38PM -, AMULYA L wrote: > > Public bug reported: > > > > We are trying to convert a VMDK image to VHDX image for deploy to HyperV > > Server ( SCVMM 2012 SP1) using qemu-img. > > We tried converti

Re: [Qemu-devel] [Bug 1399191] [NEW] Large VHDX image size

2015-01-12 Thread Jeff Cody
On Sun, Jan 11, 2015 at 11:33:31PM -0500, Lokesha, Amulya wrote: > Please find comments inline > > -Original Message- > From: boun...@canonical.com [mailto:boun...@canonical.com] On Behalf Of Jeff > Cody > Sent: Wednesday, January 07, 2015 9:11 PM > To: Lokesha,

[Qemu-devel] [PATCH] block: update string sizes for filename, backing_file, exact_filename

2015-01-13 Thread Jeff Cody
es match the most common usage. This patch also updates two block drivers that still use 1024-byte sized arrays for 'backing_file'. Signed-off-by: Jeff Cody --- block/mirror.c| 2 +- block/qapi.c | 2 +- include/block/block_int.h | 8 3 files change

[Qemu-devel] [PATCH v2 0/6] RESEND - Update filename string sizes in block layer

2015-01-20 Thread Jeff Cody
about are in the diff context and not the actual changes, so I did not fix them up to satisfy checkpatch. Changes from v2: - Change stack allocations to dybnamic (Thanks Kevin) - Update qcow/qcow2 ti perform safety checks for platforms that have a PATH_MAX < 1024 (thanks John,

[Qemu-devel] [PATCH v2 4/6] block: move string allocation from stack to the heap

2015-01-20 Thread Jeff Cody
Rather than allocate PATH_MAX bytes on the stack, use g_strndup() to dynamically allocate the string, and add an exit label for cleanup. Signed-off-by: Jeff Cody --- block.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/block.c b/block.c index cbe4a32..39cd7a6

[Qemu-devel] [PATCH v2 2/6] block: vmdk - move string allocations from stack to the heap

2015-01-20 Thread Jeff Cody
Functions 'vmdk_parse_extents' and 'vmdk_create' allocate several PATH_MAX sized arrays on the stack. Make these dynamically allocated. Signed-off-by: Jeff Cody --- block/vmdk.c | 64 1 file changed, 38 inserti

[Qemu-devel] [PATCH v2 3/6] block: qapi - move string allocation from stack to the heap

2015-01-20 Thread Jeff Cody
Rather than declaring 'backing_filename2' on the stack in bdrv_quiery_image_info(), dynamically allocate it on the heap. Signed-off-by: Jeff Cody --- block/qapi.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/block/qapi.c b/block/qapi.c index a6fd6f

[Qemu-devel] [PATCH v2 5/6] block: mirror - change string allocation to 2-bytes

2015-01-20 Thread Jeff Cody
ename[] is populated by bdrv_get_backing_filename(), a string size of 1 will always only return '\0'; Signed-off-by: Jeff Cody --- block/mirror.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/mirror.c b/block/mirror.c index 9019d1b..4056164 100644 --- a

[Qemu-devel] [PATCH v2 1/6] block: vmdk - make ret variable usage clear

2015-01-20 Thread Jeff Cody
Keep the variable 'ret' something that is returned by the function it is defined in. For the return value of 'sscanf', use a more meaningful variable name. Signed-off-by: Jeff Cody --- block/vmdk.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff

[Qemu-devel] [PATCH v2 6/6] block: update string sizes for filename, backing_file, exact_filename

2015-01-20 Thread Jeff Cody
stack usage for qemu-img does not seem worrisome. Signed-off-by: Jeff Cody --- block/qapi.c | 4 ++-- block/qcow.c | 2 +- block/qcow2.c | 3 ++- block/vvfat.c | 4 ++-- include/block/block_int.h | 8 qemu-img.c| 4 ++-

[Qemu-devel] [PATCH] block: vhdx - force FileOffsetMB field to '0' for certain block states

2015-01-20 Thread Jeff Cody
not there (PAYLOAD_BLOCK_UNDEFINED, PAYLOAD_BLOCK_NOT_PRESENT, PAYLOAD_BLOCK_UNMAPPED) have multiple options for what FileOffsetMB may be set to, and '0' is explicitly called out as an option. For all the above states, we will also just set the FileOffsetMB value to 0. Signed-off-by: Jeff Cod

Re: [Qemu-devel] [Bug 1399191] [NEW] Large VHDX image size

2015-01-20 Thread Jeff Cody
On Mon, Jan 19, 2015 at 03:19:05PM +, Lokesha, Amulya wrote: > > > -Original Message- > From: Jeff Cody [mailto:jc...@redhat.com] > Sent: Tuesday, January 13, 2015 9:18 AM > To: Lokesha, Amulya > Cc: Bug 1399191; Geoffroy, Daniel > Subject: Re: [Qemu-devel] [

Re: [Qemu-devel] [PATCH v2 4/6] block: move string allocation from stack to the heap

2015-01-22 Thread Jeff Cody
On Thu, Jan 22, 2015 at 11:37:54AM +, Stefan Hajnoczi wrote: > On Tue, Jan 20, 2015 at 12:31:31PM -0500, Jeff Cody wrote: > > Rather than allocate PATH_MAX bytes on the stack, use g_strndup() to > > dynamically allocate the string, and add an exit label for cleanup. > &g

[Qemu-devel] [PATCH v3 0/6] Update filename string sizes in block layer

2015-01-22 Thread Jeff Cody
xed typo in commit message (Thanks Stefan) Changes from v2: - Change stack allocations to dybnamic (Thanks Kevin) - Update qcow/qcow2 ti perform safety checks for platforms that have a PATH_MAX < 1024 (thanks John, Kevin). Jeff Cody (6): block: vmdk - make ret variable us

[Qemu-devel] [PATCH v3 2/6] block: vmdk - move string allocations from stack to the heap

2015-01-22 Thread Jeff Cody
Functions 'vmdk_parse_extents' and 'vmdk_create' allocate several PATH_MAX sized arrays on the stack. Make these dynamically allocated. Signed-off-by: Jeff Cody --- block/vmdk.c | 39 +++ 1 file changed, 23 insertions(+), 16 deletions(-)

[Qemu-devel] [PATCH v3 6/6] block: update string sizes for filename, backing_file, exact_filename

2015-01-22 Thread Jeff Cody
stack usage for qemu-img does not seem worrisome. Reviewed-by: Stefan Hajnoczi Reviewed-by: John Snow Signed-off-by: Jeff Cody --- block/qapi.c | 4 ++-- block/qcow.c | 2 +- block/qcow2.c | 3 ++- block/vvfat.c | 4 ++-- include/block/blo

[Qemu-devel] [PATCH v3 1/6] block: vmdk - make ret variable usage clear

2015-01-22 Thread Jeff Cody
Keep the variable 'ret' something that is returned by the function it is defined in. For the return value of 'sscanf', use a more meaningful variable name. Reviewed-by: Stefan Hajnoczi Reviewed-by: John Snow Signed-off-by: Jeff Cody --- block/vmdk.c | 14 -

[Qemu-devel] [PATCH v3 3/6] block: qapi - move string allocation from stack to the heap

2015-01-22 Thread Jeff Cody
Rather than declaring 'backing_filename2' on the stack in bdrv_query_image_info(), dynamically allocate it on the heap. Reviewed-by: John Snow Signed-off-by: Jeff Cody --- block/qapi.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/block/qapi.c b/block/qa

[Qemu-devel] [PATCH v3 5/6] block: mirror - change string allocation to 2-bytes

2015-01-22 Thread Jeff Cody
ename[] is populated by bdrv_get_backing_filename(), a string size of 1 will always only return '\0'; Reviewed-by: Stefan Hajnoczi Reviewed-by: John Snow Signed-off-by: Jeff Cody --- block/mirror.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/mirror.c b

[Qemu-devel] [PATCH v3 4/6] block: remove unused variable in bdrv_commit

2015-01-22 Thread Jeff Cody
As Stefan pointed out, the variable 'filename' in bdrv_commit is unused, despite being maintained in previous patches. With this patch, get rid of the variable for good. Signed-off-by: Jeff Cody --- block.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/block.c b/block.c ind

Re: [Qemu-devel] [Bug 1399191] [NEW] Large VHDX image size

2015-01-22 Thread Jeff Cody
On Thu, Jan 22, 2015 at 05:20:20AM +, Lokesha, Amulya wrote: >  > [...]   >  >> Yes, I have sent a patch that I believe fixes the issue (I cc'ed you on >> the patch).  If you wouldn't mind testing, and verifying that it fixes >> your particular issue, that would be great.  I test

Re: [Qemu-devel] [Bug 1399191] [NEW] Large VHDX image size

2015-01-22 Thread Jeff Cody
On Thu, Jan 22, 2015 at 04:24:45PM +, Lokesha, Amulya wrote: > > -Original Message- > From: Jeff Cody [mailto:jc...@redhat.com] > Sent: Thursday, January 22, 2015 9:33 PM > To: Lokesha, Amulya > Cc: Bug 1399191; Geoffroy, Daniel > Subject: Re: [Qemu-devel] [Bug

Re: [Qemu-devel] [PATCH RFC 2/2] block: Warn on insecure format probing

2014-11-04 Thread Jeff Cody
On Tue, Nov 04, 2014 at 10:39:36AM +0100, Markus Armbruster wrote: > Kevin Wolf writes: > > > Am 30.10.2014 um 13:49 hat Markus Armbruster geschrieben: > >> Kevin Wolf writes: > >> > >> > Am 29.10.2014 um 14:54 hat Markus Armbruster geschrieben: > >> >> Kevin Wolf writes: > >> >> > Instead, le

Re: [Qemu-devel] Image probing: how it can be insecure, and what we could do about it

2014-11-04 Thread Jeff Cody
On Tue, Nov 04, 2014 at 07:45:38PM +0100, Markus Armbruster wrote: > I'll try to explain all solutions fairly. Isn't easy when you're as > biased towards one of them as I am. Please bear with me. > > > = The trust boundary between image contents and meta-data = > > A disk image consists of ima

Re: [Qemu-devel] [PATCH 2/6] block/parallels: allow to specify DiskDescriptor.xml instead of image file

2014-11-04 Thread Jeff Cody
rsed and the image is reopened as bs->file to keep the > rest of the driver untouched. This would be changed later with more > features added. > > Signed-off-by: Denis V. Lunev > Acked-by: Roman Kagan > CC: Jeff Cody > CC: Kevin Wolf &

Re: [Qemu-devel] [PATCH 3/6] iotests: simple parallels XML disk descriptor file test added

2014-11-04 Thread Jeff Cody
On Wed, Oct 29, 2014 at 04:38:08PM +0300, Denis V. Lunev wrote: > Signed-off-by: Denis V. Lunev > Acked-by: Roman Kagan > CC: Jeff Cody > CC: Kevin Wolf > CC: Stefan Hajnoczi > --- > tests/qemu-iotests/076| 6 ++ > te

Re: [Qemu-devel] [PATCH 4/6] block/parallels: support padded Parallels images

2014-11-04 Thread Jeff Cody
his is available in DiskDescriptor.xml ONLY. There > is no such data in the image header. > > There share of such images could be evaluated as 6-8% according to the > statistics in my hands. > > This patch obtains proper value from XML and applies it on reading. > > Sig

Re: [Qemu-devel] [PATCH 5/6] iotests: padded parallels image test

2014-11-04 Thread Jeff Cody
h data in the image header. > > This patch contains very simple image with padding and corresponding > XML disk descriptor created in authentic way. > > Signed-off-by: Denis V. Lunev > Acked-by: Roman Kagan > CC: Jeff Cody > CC: Kevin Wolf > CC: Stefan Hajnoczi &g

Re: [Qemu-devel] [PATCH 6/6] parallels: change copyright information in the image header

2014-11-04 Thread Jeff Cody
On Wed, Oct 29, 2014 at 04:38:11PM +0300, Denis V. Lunev wrote: > Signed-off-by: Denis V. Lunev > Acked-by: Roman Kagan > CC: Jeff Cody > CC: Kevin Wolf > CC: Stefan Hajnoczi > --- > block/parallels.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-)

Re: [Qemu-devel] Image probing: how it can be insecure, and what we could do about it

2014-11-06 Thread Jeff Cody
On Thu, Nov 06, 2014 at 02:57:07PM +0100, Markus Armbruster wrote: > Kevin Wolf writes: > > > Am 04.11.2014 um 19:45 hat Markus Armbruster geschrieben: [...] > >> I proposed something less radical, namely to keep guessing the image > >> format, but base the guess on trusted meta-data only: file

Re: [Qemu-devel] Image probing: how it can be insecure, and what we could do about it

2014-11-06 Thread Jeff Cody
On Thu, Nov 06, 2014 at 01:53:35PM +0100, Max Reitz wrote: > On 2014-11-06 at 13:26, Markus Armbruster wrote: > >Max Reitz writes: > > > >>On 2014-11-04 at 19:45, Markus Armbruster wrote: > >>>I'll try to explain all solutions fairly. Isn't easy when you're as > >>>biased towards one of them as I

Re: [Qemu-devel] Image probing: how it can be insecure, and what we could do about it

2014-11-06 Thread Jeff Cody
On Thu, Nov 06, 2014 at 03:14:19PM +0100, Eric Blake wrote: > On 11/06/2014 02:57 PM, Markus Armbruster wrote: > > >> Yes, you can override the backing file driver (backing.driver=raw should > >> do the trick). Not really user-friendly, especially with long backing > >> file chains, but it happens

Re: [Qemu-devel] Image probing: how it can be insecure, and what we could do about it

2014-11-07 Thread Jeff Cody
On Fri, Nov 07, 2014 at 04:21:38PM +0100, Markus Armbruster wrote: > Kevin Wolf writes: > > > Am 06.11.2014 um 14:57 hat Markus Armbruster geschrieben: > >> Kevin Wolf writes: > >> > >> > Am 04.11.2014 um 19:45 hat Markus Armbruster geschrieben: > >> >> I'll try to explain all solutions fairly.

Re: [Qemu-devel] Image probing: how it can be insecure, and what we could do about it

2014-11-10 Thread Jeff Cody
On Mon, Nov 10, 2014 at 11:30:25AM +0100, Markus Armbruster wrote: > Kevin Wolf writes: > > > Am 10.11.2014 um 09:12 hat Markus Armbruster geschrieben: > >> Jeff Cody writes: > >> > So that would mean .img would always require format=, right? > >> >

[Qemu-devel] [PATCH 1/2] block: remove BLOCK_OPT_NOCOW from vdi_create_opts

2014-12-03 Thread Jeff Cody
In commit 7074786, the need for NOCOW was removed from the vdi driver, as we removed the the posix calls. However, the BLOCK_OPT_NOCOW was not removed from vdi_create_opts. This was a mistake - remove the opt from there as well. Signed-off-by: Jeff Cody --- block/vdi.c | 5 - 1 file

[Qemu-devel] [PATCH 2/2] block: remove BLOCK_OPT_NOCOW from vpc_create_opts

2014-12-03 Thread Jeff Cody
In commit fef6070, the need for NOCOW was removed from the vpc driver, as we removed the the posix calls. However, the BLOCK_OPT_NOCOW was not removed from vpc_create_opts. This was a mistake - remove the opt from there as well. Signed-off-by: Jeff Cody --- block/vpc.c | 5 - 1 file

[Qemu-devel] [PATCH 0/2] Remove BLOCK_OPT_NOCOW from VDI and VPC

2014-12-03 Thread Jeff Cody
This removes the unneeded BLOCK_OPT_NOCOW options from vdi and vpc. Jeff Cody (2): block: remove BLOCK_OPT_NOCOW from vdi_create_opts block: remove BLOCK_OPT_NOCOW from vpc_create_opts block/vdi.c | 5 - block/vpc.c | 5 - 2 files changed, 10 deletions(-) -- 1.9.3

Re: [Qemu-devel] [PATCH] vhdx: Return true for bdrv_has_zero_init

2014-12-05 Thread Jeff Cody
On Fri, Dec 05, 2014 at 12:49:22PM +0100, Kevin Wolf wrote: > Am 05.12.2014 um 11:26 hat Kevin Wolf geschrieben: > > Like for most other image formats, vhdx images read as all zero in qemu > > after their creation (we're taking advantage from the fact that qemu has > > just created the image, becau

Re: [Qemu-devel] [PATCH] vhdx: Return true for bdrv_has_zero_init

2014-12-05 Thread Jeff Cody
On Fri, Dec 05, 2014 at 12:07:19PM +0100, Kevin Wolf wrote: > Am 05.12.2014 um 11:26 hat Kevin Wolf geschrieben: > > Like for most other image formats, vhdx images read as all zero in qemu > > after their creation (we're taking advantage from the fact that qemu has > > just created the image, becau

[Qemu-devel] [PATCH 0/4] VHDX Fixes for zero init

2014-12-07 Thread Jeff Cody
: block: vhdx - update PAYLOAD_BLOCK_UNMAPPED value to match 1.00 spec 3/4: compiling: 44f08c2: block: vhdx - change .vhdx_create default block state to ZERO 4/4: compiling: 3eb0cd2: block: vhdx - set .bdrv_has_zero_init to bdrv_has_zero_init_1 Jeff Cody (4): block: vhdx - remove redundant comments

[Qemu-devel] [PATCH 3/4] block: vhdx - change .vhdx_create default block state to ZERO

2014-12-07 Thread Jeff Cody
s the default to 'on', and provides some help information to warn against setting it to 'off' when using qemu-img convert. Signed-off-by: Jeff Cody --- block/vhdx.c | 6 -- qemu-doc.texi | 6 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/block/vhdx

[Qemu-devel] [PATCH 1/4] block: vhdx - remove redundant comments

2014-12-07 Thread Jeff Cody
Minor cleanup. Signed-off-by: Jeff Cody --- block/vhdx.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/block/vhdx.c b/block/vhdx.c index 12bfe75..f1e1e2e 100644 --- a/block/vhdx.c +++ b/block/vhdx.c @@ -1109,8 +1109,8 @@ static coroutine_fn int vhdx_co_readv

[Qemu-devel] [PATCH 2/4] block: vhdx - update PAYLOAD_BLOCK_UNMAPPED value to match 1.00 spec

2014-12-07 Thread Jeff Cody
compatibility with any images out in the wild that may have been created in accordance to the 0.95 spec. Reported-by: Kevin Wolf Signed-off-by: Jeff Cody --- block/vhdx.c | 3 ++- block/vhdx.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/block/vhdx.c b/block/vhdx.c index

[Qemu-devel] [PATCH 4/4] block: vhdx - set .bdrv_has_zero_init to bdrv_has_zero_init_1

2014-12-07 Thread Jeff Cody
Now that new VHDX images will default to BAT block states of PAYLOAD_BLOCK_ZERO, we can indicate that VHDX has zero init. Signed-off-by: Jeff Cody --- block/vhdx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/vhdx.c b/block/vhdx.c index ddefc2a..2bbb3ee 100644 --- a/block/vhdx.c

Re: [Qemu-devel] [PATCH 4/4] block: vhdx - set .bdrv_has_zero_init to bdrv_has_zero_init_1

2014-12-12 Thread Jeff Cody
On Fri, Dec 12, 2014 at 09:43:16AM -0500, Lokesha, Amulya wrote: >Hi Max, > >  Please reply in-line, it makes it easier to follow technical discussions - thanks :) > >We applied all the 5 patches from the mail chain I got since the last >week. Please find attached the patches us

Re: [Qemu-devel] [PATCH 4/4] block: vhdx - set .bdrv_has_zero_init to bdrv_has_zero_init_1

2014-12-17 Thread Jeff Cody
gt; of a syntax error in the file. > > Please find my comments inline for your questions > > Please let us know if there is anything else you need from us. > > Amulya, I will try to test this on Windows Server, and see if I can reproduce what you are seeing. -Jeff > >

Re: [Qemu-devel] Failing iotests in v2.3.0-rc2 / master

2015-04-14 Thread Jeff Cody
On Tue, Apr 14, 2015 at 11:57:35AM +0200, Kevin Wolf wrote: > Am 11.04.2015 um 05:41 hat Andreas Färber geschrieben: > > Hi, > > > > 001 seems to hang for -qcow (or is not reasonably "quick": >5 min). > > > > 033 is failing for -vhdx. > > > > (Note that `make check-block` only tests -qcow2, so d

Re: [Qemu-devel] Failing iotests in v2.3.0-rc2 / master

2015-04-15 Thread Jeff Cody
iov2.iov_len); > sectors_to_write += iov2.iov_len >> BDRV_SECTOR_BITS; > } > } acked-by: Jeff Cody

Re: [Qemu-devel] [PATCH 2/2] vhdx: Fix zero-fill iov length

2015-04-15 Thread Jeff Cody
iov2.iov_len); Definite bug fix here > sectors_to_write += iov2.iov_len >> BDRV_SECTOR_BITS; > } > } > -- > 1.8.3.1 > Acked-by: Jeff Cody

Re: [Qemu-devel] [PATCH 1/2] blkdebug: Add bdrv_truncate()

2015-04-15 Thread Jeff Cody
refresh_filename = blkdebug_refresh_filename, > > .bdrv_aio_readv = blkdebug_aio_readv, > -- > 1.8.3.1 > Reviewed-by: Jeff Cody

[Qemu-devel] [PATCH] MAINTAINERS: Add jcody as blockjobs, block devices maintainer

2015-03-06 Thread Jeff Cody
different patch: As we split out the block layer, we will begin using the qemu-block mailing list as a catchall for all of the block layer subcomponents. Please CC qemu-bl...@nongnu.org for all block layer patches, including any that touch the above listed areas. Signed-off-by: Jeff Cody

Re: [Qemu-devel] [PATCH] MAINTAINERS: Add jcody as blockjobs, block devices maintainer

2015-03-06 Thread Jeff Cody
On Fri, Mar 06, 2015 at 03:08:29PM -0600, Stefan Hajnoczi wrote: > On Fri, Mar 06, 2015 at 12:16:06PM -0500, Jeff Cody wrote: > > The block layer maintainership is being split up into smaller, more > > manageable pieces. > > > > I propose that I take over / assi

[Qemu-devel] [PATCH v2 06/11] block: make 'top' argument to block-commit optional

2014-05-27 Thread Jeff Cody
Now that active layer block-commit is supported, the 'top' argument no longer needs to be mandatory. Change it to optional, with the default being the active layer in the device chain. Reviewed-by: Eric Blake Reviewed-by: Benoit Canet Signed-off-by: Jeff Cody --- blockdev.c

[Qemu-devel] [PATCH v2 11/11] block: add QAPI command to allow live backing file change

2014-05-27 Thread Jeff Cody
u-img rebase -u', with respect to change the backing file string. Signed-off-by: Jeff Cody --- blockdev.c | 118 +++ hmp-commands.hx | 16 hmp.c| 16 hmp.h| 1 + qa

[Qemu-devel] [PATCH v2 01/11] block: Auto-generate node_names for each BDS entry

2014-05-27 Thread Jeff Cody
prefix is to aid in identifying it as a qemu-generated name, the numeric portion is to guarantee uniqueness in a given qemu session, and the random characters are to further avoid any accidental collisions with user-specified node-names. Reviewed-by: Eric Blake Signed-off-by: Jeff Cod

[Qemu-devel] [PATCH v2 08/11] block: extend block-commit to accept a string for the backing file

2014-05-27 Thread Jeff Cody
specifying the backing file string will be treated as an error (there is no overlay image to modify in that case). If a backing file string is not specified in the command, the backing file string to use is determined in the same manner as it was previously. Signed-off-by: Jeff Cody --

[Qemu-devel] [PATCH v2 05/11] block: simplify bdrv_find_base()

2014-05-27 Thread Jeff Cody
This simplifies the function bdrv_find_base(), while keeping the same functionality. Signed-off-by: Jeff Cody --- block.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/block.c b/block.c index 577d4f1..cf29494 100644 --- a/block.c +++ b/block.c @@ -4363,20

<    3   4   5   6   7   8   9   10   11   12   >