Bug 1506476 - Document more detail about specifying backing file for commit
Summary: Document more detail about specifying backing file for commit
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.5
Hardware: x86_64
OS: Linux
Target Milestone: rc
: ---
Assignee: Max Reitz
QA Contact: Tingting Mao
Depends On:
TreeView+ depends on / blocked
Reported: 2017-10-26 07:59 UTC by Ping Li
Modified: 2018-11-01 11:01 UTC (History)
9 users (show)

Fixed In Version: qemu-kvm-rhev-2.12.0-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-11-01 11:01:10 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Ping Li 2017-10-26 07:59:05 UTC
Description of problem:
Created the snapshot chain as base -> sn1 -> sn2. Boot guest with the created image and created temporary files fbase, fsn1, and fsn2 in turn. Commit the changes of sn2 to the base image. Found the temporary files in the guest are changed as below:
base: fbase, fsn1, and fsn2
sn1: fbase, and fsn1
sn2: fbase, fsn1, and fsn2

Checked the scenario with Max(@mreitz), it is expected. But I think below statement explained by Max should be added to the qemu-img manpage. It will help to create a better understanding of the feature.

> If you commit the changes from an image into one in its backing chain,
> all of the intermediate images become obsolete and actually invalid.
> Therefore, in this case, sn1 may no longer be used after the commit
> operation.

Comment 2 Ademar Reis 2017-10-27 09:19:08 UTC
Date: Thu, 26 Oct 2017 09:59:47 +0200
From: Max Reitz <mreitz@redhat.com>
Subject: [Qemu-devel] [PATCH] qemu-img.1: Image invalidation on qemu-img commit
To: qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>

qemu-img commit invalidates all images between base and top.  This
should be mentioned in the man page.

Suggested-by: Ping Li <pingl@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
 qemu-img.texi | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

Comment 6 Ping Li 2018-05-09 04:35:18 UTC
Checked the manpage, found below descriptions were added.

Note that after a commit operation all images between
base and the top image will be invalid and may return garbage
data when read. For this reason, "-b" implies "-d" (so that the
top image stays valid).

Set the bug as verified.

Comment 7 errata-xmlrpc 2018-11-01 11:01:10 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.