aboutsummaryrefslogtreecommitdiff
path: root/CODING_STYLE
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2013-10-24 20:35:06 +0200
committerKevin Wolf <kwolf@redhat.com>2013-10-28 17:34:32 +0100
commitba2ab2f2ca4150a7e314fbb19fa158bd8ddc36eb (patch)
tree4b316a5fcf24d32e84fb45b7186936db8f1a6f42 /CODING_STYLE
parentab6f2bbb2871db8a7ed2457328e864cdf2e2fc82 (diff)
qcow2: Flush image after creation
Opening the qcow2 image with BDRV_O_NO_FLUSH prevents any flushes during the image creation. This means that the image has not yet been flushed to disk when qemu-img create exits. This flush is delayed until the next operation on the image involving opening it without BDRV_O_NO_FLUSH and closing (or directly flushing) it. For large images and/or images with a small cluster size and preallocated metadata, this flush may take a significant amount of time and may occur unexpectedly. Reopening the image without BDRV_O_NO_FLUSH right before the end of qcow2_create2() results in hoisting the potentially costly flush into the image creation, which is expected to take some time (whereas successive image operations may be not). Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Benoit Canet <benoit@irqsave.net> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'CODING_STYLE')
0 files changed, 0 insertions, 0 deletions