From: John Snow <jsnow@redhat.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, eblake@redhat.com, qemu-devel@nongnu.org,
mreitz@redhat.com
Subject: Re: [Qemu-devel] [PATCH v5 0/2] qemu-img: Check for backing image if specified during create
Date: Mon, 17 Jul 2017 20:38:12 -0400 [thread overview]
Message-ID: <1b1c8192-d488-b6c4-7a4c-ffbfdb02e50a@redhat.com> (raw)
In-Reply-To: <20170718003422.4497-1-jsnow@redhat.com>
Kevin: I took a stab at this 'feature', but if there are any fixups or
changes that need to occur and it's important that it happens before I'm
awake, please feel free to steal these patches and do whatever you need
to them, including setting them on fire.
Thanks,
--John
post-script: I think the only thing that I don't really do here is
attempt to force-open an image to see if it exists if a size is already
provided in order to quiet errors related to locking.
That change would just eliminate a little bit of "this image is locked!"
whining in the case that -u was omitted but a size was provided, which
is mostly QOL.
On 07/17/2017 08:34 PM, John Snow wrote:
> We do not currently guarantee that QEMU will or will not open a
> backing file when creating a new overlay file. Presently, QEMU will
> not open that file if you provide a filesize, because it has no reason
> to want to open it in that case.
>
> This series makes the contract more explicit: if '-u' is provided to
> create, we will not open the backing image regardless, erroring out if
> a size was not provided.
>
> In the other case, if '-u' is not provided, we now endeavor to open the
> backing image if possible to check that it exists. For now, if a size
> is provided and the image does not exist, QEMU will only warn to maintain
> compatibility with legacy behavior.
>
> In the future, QEMU may treat the operation as a failure if '-u' was not
> provided.
>
> Tests are amended primarily to pass the '-u' flag where it makes sense;
> which is when creating overlays for objects already open by QEMU. These
> will now generally fail to succeed because of image locking. In this
> case, they only warn instead of fail, but this keeps the output cleaner.
>
> Test 111 is updated to accommodate a new error message.
> 082, 085, 139, 156 and 158 add '-u' just to suppress warnings.
>
> John Snow (2):
> blockdev: move BDRV_O_NO_BACKING option forward
> qemu-img: Check for backing image if specified during create
>
> block.c | 96 +++++++++++++++++++++++++---------------------
> blockdev.c | 11 +++---
> qemu-img-cmds.hx | 4 +-
> qemu-img.c | 16 +++++---
> tests/qemu-iotests/082 | 4 +-
> tests/qemu-iotests/082.out | 4 +-
> tests/qemu-iotests/085 | 2 +-
> tests/qemu-iotests/111.out | 1 +
> tests/qemu-iotests/139 | 2 +-
> tests/qemu-iotests/156 | 2 +-
> tests/qemu-iotests/158 | 2 +-
> 11 files changed, 81 insertions(+), 63 deletions(-)
>
next prev parent reply other threads:[~2017-07-18 0:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-18 0:34 [Qemu-devel] [PATCH v5 0/2] qemu-img: Check for backing image if specified during create John Snow
2017-07-18 0:34 ` [Qemu-devel] [PATCH v5 1/2] blockdev: move BDRV_O_NO_BACKING option forward John Snow
2017-07-18 12:27 ` Eric Blake
2017-07-18 0:34 ` [Qemu-devel] [PATCH v5 2/2] qemu-img: Check for backing image if specified during create John Snow
2017-07-18 12:51 ` Eric Blake
2017-07-18 15:33 ` John Snow
2017-07-18 15:44 ` Eric Blake
2017-07-18 0:38 ` John Snow [this message]
2017-07-18 12:25 ` [Qemu-devel] [PATCH v5 0/2] " no-reply
2017-07-18 13:31 ` Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1b1c8192-d488-b6c4-7a4c-ffbfdb02e50a@redhat.com \
--to=jsnow@redhat.com \
--cc=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).