All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/3] qemu-img: Allow rebase with no input base
@ 2018-07-13 11:14 Max Reitz
  2018-07-13 11:14 ` [Qemu-devel] [PATCH 1/3] " Max Reitz
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Max Reitz @ 2018-07-13 11:14 UTC (permalink / raw)
  To: qemu-block; +Cc: qemu-devel, Max Reitz, Kevin Wolf

This series allows using qemu-img rebase 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.


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/024     | 70 ++++++++++++++++++++++++++++++++++++
 tests/qemu-iotests/024.out | 37 ++++++++++++++++++++
 3 files changed, 150 insertions(+), 29 deletions(-)

-- 
2.17.1

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2019-04-24 14:14 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-13 11:14 [Qemu-devel] [PATCH 0/3] qemu-img: Allow rebase with no input base Max Reitz
2018-07-13 11:14 ` [Qemu-devel] [PATCH 1/3] " Max Reitz
2019-04-18 18:55   ` Eric Blake
2019-04-24 13:38     ` Max Reitz
2018-07-13 11:14 ` [Qemu-devel] [PATCH 2/3] qemu-img: Use zero writes after source backing EOF Max Reitz
2018-07-20 21:22   ` Eric Blake
2018-07-21 21:13     ` Max Reitz
2019-04-18 18:59   ` Eric Blake
2019-04-24 13:42     ` Max Reitz
2018-07-13 11:14 ` [Qemu-devel] [PATCH 3/3] iotests: Add test for rebase without input base Max Reitz
2019-02-06 15:35 ` [Qemu-devel] [PATCH 0/3] qemu-img: Allow rebase with no " Max Reitz
2019-04-13 16:11 ` Max Reitz
2019-04-13 16:11   ` Max Reitz
2019-04-18 17:00   ` Vladimir Sementsov-Ogievskiy
2019-04-24 13:48     ` Max Reitz
2019-04-24 14:05       ` Vladimir Sementsov-Ogievskiy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.