]> git.ipfire.org Git - thirdparty/qemu.git/commit
block: Pass truncate exact=true where reasonable
authorMax Reitz <mreitz@redhat.com>
Wed, 18 Sep 2019 09:51:43 +0000 (11:51 +0200)
committerMax Reitz <mreitz@redhat.com>
Mon, 28 Oct 2019 11:08:45 +0000 (12:08 +0100)
commite8d04f92378c2de7b464e04469a657fd37eb29ea
tree0a274a9f3c9716def5230a4f09463e9d23fdd432
parente61a28a9b6b43da6a7a48f6d325fceadf9769388
block: Pass truncate exact=true where reasonable

This is a change in behavior, so all instances need a good
justification.  The comments added here should explain my reasoning.

qed already had a comment that suggests it always expected
bdrv_truncate()/blk_truncate() to behave as if exact=true were passed
(c743849bee7 came eight months before 55b949c8476), so it was simply
broken until now.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-id: 20190918095144.955-8-mreitz@redhat.com
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
[mreitz: Changed comment in qed.c to explain why a new QED file must be
         empty, as requested and suggested by Maxim]
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/parallels.c
block/qcow2.c
block/qed.c
qemu-img.c
qemu-io-cmds.c