block: Error if backing file fails during creation without -u
commitadd8200dd14041d059cc376eff91461fadd93ec5
authorEric Blake <eblake@redhat.com>
Mon, 6 Jul 2020 20:39:50 +0000 (6 15:39 -0500)
committerKevin Wolf <kwolf@redhat.com>
Tue, 14 Jul 2020 13:18:59 +0000 (14 15:18 +0200)
tree8822b99922a34276ef31cbd8d76b1f8d157c916f
parent344acbd62ffdbeb7f803644ad46a8129059f6823
block: Error if backing file fails during creation without -u

Back in commit 6e6e55f5 (Jul 2017, v2.10), we tweaked the code to warn
if the backing file could not be opened but the user gave a size,
unless the user also passes the -u option to bypass the open of the
backing file.  As one common reason for failure to open the backing
file is when there is mismatch in the requested backing format in
relation to what the backing file actually contains, we actually want
to open the backing file and ensure that it has the right format in as
many cases as possible.  iotest 301 for qcow demonstrates how
detecting explicit format mismatch is useful to prevent the creation
of an image that would probe differently than the user requested.  Now
is the time to finally turn the warning an error, as promised.

Note that the original warning was added prior to our documentation of
an official deprecation policy (eb22aeca, also Jul 2017), and because
the warning didn't mention the word "deprecated", we never actually
remembered to document it as such.  But the warning has been around
long enough that I don't see prolonging it another two releases.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200706203954.341758-7-eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c
docs/system/deprecated.rst
tests/qemu-iotests/111.out
tests/qemu-iotests/301.out