summaryrefslogtreecommitdiff
path: root/block
AgeCommit message (Collapse)AuthorFilesLines
2013-12-16Merge remote-tracking branch 'spice/tags/pull-spice-1' into stagingAnthony Liguori4-348/+469
Collection of little cleanups anf bugfixes. nbd patches in preparation of spice-nbd. # gpg: Signature made Mon 16 Dec 2013 01:27:45 AM PST using RSA key ID D3E87138 # gpg: Can't check signature: public key not found # By Marc-André Lureau (12) and Gerd Hoffmann (4) # Via Gerd Hoffmann * spice/tags/pull-spice-1: spice: stop server for qxl hard reset spice: move spice_server_vm_{start,stop} calls into qemu_spice_display_*() spice: move qemu_spice_display_*() from spice-graphics to spice-core nbd: avoid uninitialized warnings nbd: finish any pending coroutine nbd: make nbd_client_session_close() idempotent nbd: pass export name as init argument nbd: don't change socket block during negotiate Split nbd block client code spice-char: implement chardev port event char: add qemu_chr_fe_event() include: add missing config-host.h include qmp_change_blockdev() remove unused has_format spice-char: remove unused field vscclient: do not add a socket watch if there is not data to send spice: flip streaming video mode to off by default
2013-12-16Merge remote-tracking branch 'kwolf/tags/for-anthony' into stagingAnthony Liguori3-28/+31
Block patches # gpg: Signature made Fri 13 Dec 2013 09:47:03 AM PST using RSA key ID C88F2FD6 # gpg: Can't check signature: public key not found # By Peter Lieven (2) and others # Via Kevin Wolf * kwolf/tags/for-anthony: blkdebug: Use QLIST_FOREACH_SAFE to resume IO qemu-img: make progress output more accurate during convert block: expect get_block_status errors in bdrv_make_zero block/vvfat: Fix compiler warnings for OpenBSD qapi-schema.json: Change 1.8 reference to 2.0 sheepdog: check if '-o redundancy' is passed from user Message-id: 1386956943-19474-1-git-send-email-kwolf@redhat.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
2013-12-16nbd: avoid uninitialized warningsMarc-André Lureau1-12/+9
==15815== Thread 1: ==15815== Syscall param socketcall.sendto(msg) points to uninitialised byte(s) ==15815== at 0x65AD5CB: send (send.c:31) ==15815== by 0x37F84B: nbd_wr_sync (nbd.c:145) ==15815== by 0x37F94B: write_sync (nbd.c:186) ==15815== by 0x380FA9: nbd_send_request (nbd.c:681) ==15815== by 0x1C4A2D: nbd_teardown_connection (nbd-client.c:337) ==15815== by 0x1C4AD8: nbd_client_session_close (nbd-client.c:354) ==15815== by 0x1ED2D8: close_socketpair (spicebd.c:132) ==15815== by 0x1EE265: spice_close (spicebd.c:457) ==15815== by 0x1ACBF6: bdrv_close (block.c:1519) ==15815== by 0x1AD804: bdrv_delete (block.c:1772) ==15815== by 0x1B4136: bdrv_unref (block.c:4476) ==15815== by 0x1ACCE0: bdrv_close (block.c:1541) ==15815== Address 0x7feffef98 is on thread 1's stack Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-12-16nbd: finish any pending coroutineMarc-André Lureau1-5/+16
Make sure all pending coroutines are finished when closing the session. Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-12-16nbd: make nbd_client_session_close() idempotentMarc-André Lureau1-0/+5
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-12-16nbd: pass export name as init argumentMarc-André Lureau3-13/+14
There is no need to keep the export name around, and it seems a better fit as an argument in the init() call. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-12-16nbd: don't change socket block during negotiateMarc-André Lureau1-0/+1
The caller might handle non-blocking using coroutine. Leave the choice to the caller to use a blocking or non-blocking negotiate. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-12-16Split nbd block client codeMarc-André Lureau4-346/+452
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-12-13blkdebug: Use QLIST_FOREACH_SAFE to resume IOFam Zheng1-4/+4
Qemu-iotest 030 was broken. When the coroutine runs and finishes, it will remove itself from the req list, so let's use safe version of foreach to avoid use after free. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-12-13block/vvfat: Fix compiler warnings for OpenBSDStefan Weil1-21/+22
The buildbot shows these compiler warnings: block/vvfat.c: In function 'create_short_and_long_name': block/vvfat.c:620: warning: array size (8) smaller than bound length (11) block/vvfat.c:620: warning: array size (8) smaller than bound length (11) block/vvfat.c:635: warning: array size (8) smaller than bound length (11) block/vvfat.c:635: warning: array size (8) smaller than bound length (11) They are caused by tricky code where 8 characters for the name are followed by 3 characters for the extension, and some operations touch both name and extension. Using an 11 character name which includes the extension fixes the compiler warning, satisfies cppcheck, valgrind and maybe other static and dynamic code checkers, and even simplifies some parts of the code. Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-12-13sheepdog: check if '-o redundancy' is passed from userLiu Yuan1-3/+5
This fix a segfault (that is caused by b3af018f3) of following command: $ qemu-img convert some_img sheepdog:some_img Cc: qemu-devel@nongnu.org Cc: Kevin Wolf <kwolf@redhat.com> Cc: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Liu Yuan <namei.unix@gmail.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-12-09block/iscsi: introduce bdrv_co_{readv, writev, flush_to_disk}Peter Lieven1-296/+105
this converts read, write and flush functions from aio to coroutines eliminating almost 200 lines of code. The requirement for libiscsi is bumped to version 1.4.0 which was released in may 2012. Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-12-06qcow2: use start_of_cluster() and offset_into_cluster() everywhereHu Tao2-12/+12
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-12-05block/iscsi: set bs->bl.opt_transfer_lengthPeter Lieven1-0/+3
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-12-05block/iscsi: set bdi->cluster_sizePeter Lieven1-0/+7
this patch aims to set bdi->cluster_size to the internal page size of the iscsi target so that enabled callers can align requests properly. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-12-04qemu-nbd: support internal snapshot exportWenchao Xia1-0/+18
Now it is possible to directly export an internal snapshot, which can be used to probe the snapshot's contents without qemu-img convert. Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-12-04snapshot: distinguish id and name in load_tmpWenchao Xia3-6/+68
Since later this function will be used so improve it. The only caller of it now is qemu-img, and it is not impacted by introduce function bdrv_snapshot_load_tmp_by_id_or_name() that call bdrv_snapshot_load_tmp() twice to keep old search logic. bdrv_snapshot_load_tmp_by_id_or_name() return int to let caller know the errno, and errno will be used later. Also fix a typo in comments of bdrv_snapshot_delete(). Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-12-04qcow2: Zero-initialise first cluster for new imagesKevin Wolf1-16/+20
Strictly speaking, this is only required for has_zero_init() == false, but it's easy enough to just do a cluster-aligned write that is padded with zeros after the header. This fixes that after 'qemu-img create' header extensions are attempted to be parsed that are really just random leftover data. Cc: qemu-stable@nongnu.org Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-12-03raw-posix: add support for write_zeroes on XFS and block devicesPaolo Bonzini2-13/+74
The code is similar to the implementation of discard and write_zeroes with UNMAP. However, failure must be propagated up to block.c. The stale page cache problem can be reproduced as follows: # modprobe scsi-debug lbpws=1 lbprz=1 # ./qemu-io /dev/sdXX qemu-io> write -P 0xcc 0 2M qemu-io> write -z 0 1M qemu-io> read -P 0x00 0 512 Pattern verification failed at offset 0, 512 bytes qemu-io> read -v 0 512 00000000: cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc ................ ... # ./qemu-io --cache=none /dev/sdXX qemu-io> write -P 0xcc 0 2M qemu-io> write -z 0 1M qemu-io> read -P 0x00 0 512 qemu-io> read -v 0 512 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ ... And similarly with discard instead of "write -z". Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-12-03raw-posix: implement write_zeroes with MAY_UNMAP for block devicesPaolo Bonzini1-0/+37
See the next commit for the description of the Linux kernel problem that is worked around in raw_open_common. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-12-03raw-posix: implement write_zeroes with MAY_UNMAP for filesPaolo Bonzini1-2/+64
Writing zeroes to a file can be done by punching a hole if MAY_UNMAP is set. Note that in this case ENOTSUP is not ignored, but makes the block layer fall back to the generic implementation. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-12-03block/iscsi: check WRITE SAME support differently depending on MAY_UNMAPPaolo Bonzini1-2/+17
The current check is right for MAY_UNMAP=1. For MAY_UNMAP=0, just try and fall back to regular writes as soon as a WRITE SAME command fails. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Peter Lieven <pl@kamp.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-12-03block/iscsi: updated copyrightPeter Lieven1-0/+1
added myself to reflect recent work on the iscsi block driver. Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-12-03block/iscsi: remove .bdrv_has_zero_initPeter Lieven1-7/+0
since commit 3ac21627 the default value changed to 0. Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-12-03block drivers: expose requirement for write same alignment from formatsPaolo Bonzini3-0/+6
This will let misaligned but large requests use zero clusters. This is important because the cluster size is not guest visible. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Peter Lieven <pl@kamp.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-12-03block drivers: add discard/write_zeroes properties to bdrv_get_info ↵Paolo Bonzini5-0/+9
implementation Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Peter Lieven <pl@kamp.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-12-03vpc, vhdx: add get_infoPaolo Bonzini2-0/+24
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Peter Lieven <pl@kamp.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-12-03block: handle ENOTSUP from discard in generic codePaolo Bonzini1-6/+6
Similar to write_zeroes, let the generic code receive a ENOTSUP for discard operations. Since bdrv_discard has advisory semantics, we can just swallow the error. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Peter Lieven <pl@kamp.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-12-03vmdk: Fix creating big description fileFam Zheng1-24/+38
The buffer for description file was 4096 which only covers a few hundred of extents. This changes the buffer to dynamic allocated with g_strdup_printf in order to support bigger cases. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-11-29vmdk: Allow read only open of VMDK version 3Fam Zheng1-1/+8
Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-11-29block: Use BDRV_O_NO_BACKING where appropriateKevin Wolf2-2/+3
If you open an image temporarily just because you want to check its size or get it flushed, there's no real reason to open the whole backing file chain. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Reviewed-by: Benoit Canet <benoit@irqsave.net>
2013-11-29blkdebug: add "remove_break" commandFam Zheng1-0/+27
This adds "remove_break" command which is the reverse of blkdebug command "break": it removes all breakpoints with given tag and resumes all the requests. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-11-29sheepdog: support user-defined redundancy optionLiu Yuan1-1/+73
Sheepdog support two kinds of redundancy, full replication and erasure coding. # create a fully replicated vdi with x copies -o redundancy=x (1 <= x <= SD_MAX_COPIES) # create a erasure coded vdi with x data strips and y parity strips -o redundancy=x:y (x must be one of {2,4,8,16} and 1 <= y < SD_EC_MAX_STRIP) E.g, to convert a vdi into sheepdog vdi 'test' with 8:3 erasure coding scheme $ qemu-img convert -o redundancy=8:3 linux-0.2.img sheepdog:test Cc: Kevin Wolf <kwolf@redhat.com> Cc: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Liu Yuan <namei.unix@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-11-29sheepdog: refactor do_sd_create()Liu Yuan1-22/+15
We can actually use BDRVSheepdogState *s to pass most of the parameters. Cc: Kevin Wolf <kwolf@redhat.com> Cc: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Liu Yuan <namei.unix@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-11-29COW: Extend checking allocated bits to beyond one sectorCharlie Shepherd1-10/+26
cow_co_is_allocated() only checks one sector's worth of allocated bits before returning. This is allowed but (slightly) inefficient, so extend it to check all of the file's metadata sectors. Signed-off-by: Charlie Shepherd <charlie@ctshepherd.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> [kwolf: silenced compiler warning (-Wmaybe-uninitialized for changed)] Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-11-29COW: Speed up writesCharlie Shepherd1-38/+50
Process a whole sector's worth of COW bits by reading a sector, setting the bits after skipping any already set bits, then writing it out again. Make sure we only flush once before writing metadata, and only if we need to write metadata. Signed-off-by: Charlie Shepherd <charlie@ctshepherd.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-11-29qapi: Change BlockDirtyInfo to listFam Zheng1-0/+5
We have multiple dirty bitmaps in BDS now, switch QAPI to allow query it (BlockInfo.dirty_bitmaps), and also drop old BlockInfo.dirty. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-11-29block: per caller dirty bitmapFam Zheng2-18/+13
Previously a BlockDriverState has only one dirty bitmap, so only one caller (e.g. a block job) can keep track of writing. This changes the dirty bitmap to a list and creates a BdrvDirtyBitmap for each caller, the lifecycle is managed with these new functions: bdrv_create_dirty_bitmap bdrv_release_dirty_bitmap Where BdrvDirtyBitmap is a linked list wrapper structure of HBitmap. In place of bdrv_set_dirty_tracking, a BdrvDirtyBitmap pointer argument is added to these functions, since each caller has its own dirty bitmap: bdrv_get_dirty bdrv_dirty_iter_init bdrv_get_dirty_count bdrv_set_dirty and bdrv_reset_dirty prototypes are unchanged but will internally walk the list of all dirty bitmaps and set them one by one. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-11-28block/stream: Don't stream unbacked devicesMax Reitz1-0/+5
If a block device is unbacked, a streaming blockjob should immediately finish instead of beginning to try to stream, then noticing the backing file does not contain even the first sector (since it does not exist) and then finishing normally. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-11-28sheepdog: implement .bdrv_get_allocated_file_sizeLiu Yuan1-0/+19
With this patch, qemu-img info sheepdog:image will show disk size for sheepdog images. Cc: Kevin Wolf <kwolf@redhat.com> Cc: Stefan Hajnoczi <stefanha@redhat.com> Cc: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp> Signed-off-by: Liu Yuan <namei.unix@gmail.com> Reviewed-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-11-28iscsi: add bdrv_co_write_zeroesPeter Lieven1-0/+64
Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-11-28iscsi: simplify iscsi_co_discardPeter Lieven1-42/+25
now that bdrv_co_discard can handle limits we do not need the request split logic here anymore. Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-11-28iscsi: set limits in BlockDriverStatePeter Lieven1-0/+14
Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-11-28block/raw: copy BlockLimits on raw_openPeter Lieven1-0/+1
Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-11-28block/iscsi: add .bdrv_get_infoPeter Lieven1-0/+9
Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-11-28block: introduce BDRV_REQ_MAY_UNMAP request flagPeter Lieven1-1/+1
Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-11-28block: add flags to bdrv_*_write_zeroesPeter Lieven6-7/+11
Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-11-14qcow2: fix possible corruption when reading multiple clustersPeter Lieven1-1/+1
if multiple sectors spanning multiple clusters are read the function count_contiguous_clusters should ensure that the cluster type should not change between the clusters. Especially the for-loop should break when we have one or more normal clusters followed by a compressed cluster. Unfortunately the wrong macro was used in the mask to compare the flags. This was discovered while debugging a data corruption issue when converting a compressed qcow2 image to raw. qemu-img reads 2MB chunks which span multiple clusters. CC: qemu-stable@nongnu.org Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-11-14block: Print its file name if backing file opening failedFam Zheng2-2/+0
If backing file doesn't exist, the error message is confusing and misleading: $ qemu /tmp/a.qcow2 qemu: could not open disk image /tmp/a.qcow2: Could not open file: No such file or directory But... $ ls /tmp/a.qcow2 /tmp/a.qcow2 $ qemu-img info /tmp/a.qcow2 image: /tmp/a.qcow2 file format: qcow2 virtual size: 8.0G (8589934592 bytes) disk size: 196K cluster_size: 65536 backing file: /tmp/b.qcow2 Because... $ ls /tmp/b.qcow2 ls: cannot access /tmp/b.qcow2: No such file or directory This is not intuitive. It's better to have the missing file's name in the error message. With this patch: $ qemu-io -c 'read 0 512' /tmp/a.qcow2 qemu-io: can't open device /tmp/a.qcow2: Could not open backing file: Could not open '/stor/vm/arch.raw': No such file or directory no file open, try 'help open' Which is a little bit better. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-11-07block: vhdx - add .bdrv_create() supportJeff Cody2-1/+572
This adds support for VHDX image creation, for images of type "Fixed" and "Dynamic". "Differencing" types (i.e., VHDX images with backing files) are currently not supported. Options for image creation include: * log size: The size of the journaling log for VHDX. Minimum is 1MB, and it must be a multiple of 1MB. Invalid log sizes will be silently fixed by rounding up to the nearest MB. Default is 1MB. * block size: This is the size of a payload block. The range is 1MB to 256MB, inclusive, and must be a multiple of 1MB as well. Invalid sizes and multiples will be silently fixed. If '0' is passed, then a sane size is chosen (depending on virtual image size). Default is 0 (Auto-select). * subformat: - "dynamic" An image without data pre-allocated. - "fixed" An image with data pre-allocated. Default is "dynamic" When creating the image file, the lettered sections are created: -----------------------------------------------------------------. | (A) | (B) | (C) | (D) | (E) | File ID | Header1 | Header 2 | Region Tbl 1 | Region Tbl 2 | | | | | .-----------------------------------------------------------------. 0 64KB 128KB 192KB 256KB 320KB .---- ~ ----------- ~ ------------ ~ ---------------- ~ -----------. | (F) | (G) | (H) | | Journal Log | BAT / Bitmap | Metadata | .... data ...... | | | | .---- ~ ----------- ~ ------------ ~ ---------------- ~ -----------. 1MB (var.) (var.) (var.) Signed-off-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>