From: Max Reitz <mreitz@redhat.com>
To: qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>
Subject: [Qemu-devel] [PATCH v3 0/3] qemu-img: Allow rebase with no input base
Date: Thu, 9 May 2019 19:52:34 +0200 [thread overview]
Message-ID: <20190509175237.19363-1-mreitz@redhat.com> (raw)
This series allows using qemu-img rebase (without -u) on images that do
not have a backing file. Right now, this fails with the rather cryptic
error message:
$ qemu-img rebase -b base.qcow2 foo.qcow2
qemu-img: Could not open old backing file '': The 'file' block driver requires a file name
Yeah, well, OK.
With how rebase currently works, this would lead to the overlay being
filled with zeroes, however. This is where patch 2 comes in and instead
makes rebase use blk_pwrite_zeroes() whenever it handles an area past
the input’s backing file’s EOF.
(Note that additionally we could try to punch holes in the overlay
whenever it matches the new backing file, but that’s something I’ll put
off for later. (We don’t even have a reliable method for punching holes
into an overlay yet, although I would like to have such because it could
make active commit more efficient.))
And patch 3 adds the usual test.
v3:
- Patch 3: Move test to own file so it doesn’t run for qed or qcow2 v2
(because it can’t, it requires zero clusters)
git backport-diff against v2:
Key:
[----] : patches are identical
[####] : number of functional differences between upstream/downstream patch
[down] : patch is downstream-only
The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively
001/3:[----] [--] 'qemu-img: Allow rebase with no input base'
002/3:[----] [--] 'qemu-img: Use zero writes after source backing EOF'
003/3:[0059] [FC] 'iotests: Add test for rebase without input base'
v2:
- Patch 1: Added example to the commit message, and made a note that
this is about rebase without -u [Eric]
git backport-diff against v1:
Key:
[----] : patches are identical
[####] : number of functional differences between upstream/downstream patch
[down] : patch is downstream-only
The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively
001/3:[----] [--] 'qemu-img: Allow rebase with no input base'
002/3:[----] [--] 'qemu-img: Use zero writes after source backing EOF'
003/3:[----] [--] 'iotests: Add test for rebase without input base'
Max Reitz (3):
qemu-img: Allow rebase with no input base
qemu-img: Use zero writes after source backing EOF
iotests: Add test for rebase without input base
qemu-img.c | 72 ++++++++++++---------
tests/qemu-iotests/252 | 124 +++++++++++++++++++++++++++++++++++++
tests/qemu-iotests/252.out | 39 ++++++++++++
tests/qemu-iotests/group | 1 +
4 files changed, 207 insertions(+), 29 deletions(-)
create mode 100755 tests/qemu-iotests/252
create mode 100644 tests/qemu-iotests/252.out
--
2.21.0
next reply other threads:[~2019-05-09 17:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-09 17:52 Max Reitz [this message]
2019-05-09 17:52 ` [Qemu-devel] [PATCH v3 1/3] qemu-img: Allow rebase with no input base Max Reitz
2019-05-09 17:52 ` [Qemu-devel] [PATCH v3 2/3] qemu-img: Use zero writes after source backing EOF Max Reitz
2019-05-09 17:52 ` [Qemu-devel] [PATCH v3 3/3] iotests: Add test for rebase without input base Max Reitz
2019-05-10 9:40 ` [Qemu-devel] [PATCH v3 0/3] qemu-img: Allow rebase with no " 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=20190509175237.19363-1-mreitz@redhat.com \
--to=mreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=vsementsov@virtuozzo.com \
/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).