Bug 1677073 - Backport additional QEMU 4.0 Bitmap API changes to RHEL 7.7
Summary: Backport additional QEMU 4.0 Bitmap API changes to RHEL 7.7
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 7.7
Assignee: John Snow
QA Contact: aihua liang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-02-13 23:14 UTC by John Snow
Modified: 2019-08-22 09:20 UTC (History)
6 users (show)

Fixed In Version: qemu-kvm-rhev-2.12.0-27.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-22 09:20:23 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:2553 None None None 2019-08-22 09:20:42 UTC

Description John Snow 2019-02-13 23:14:42 UTC
Description of problem:

Beyond the removal of the x- debug prefix, there are several API changes being worked on  upstream that should be backported to qemu-kvm-rhev under RHEL7:

1. The addition of the "persistent" bit exposed via query-block
2/3. The addition of the "busy" and "recording" bits exposed via query-block, which replace the @status enum
4. The addition of the "inconsistent" or "corrupted" bit for bitmaps which allows the removal/resetting of bitmaps involved in a crash incident
5. QAPI documentation fixes and cleanups for 4.0

The corresponding features work as follows:

#1: Any bitmap set to be persistent should report via query-block that it is persistent, so users gain the ability to check that bitmaps will eventually be written out to disk on close (they do not get written out immediately, currently.)

#2: The "busy" bit replaces the status=FROZEN and status=LOCKED statuses. It should be set when the bitmap is being used for a backup operation OR when it is being used for an NBD export operation. Locked bitmaps cannot be used for any QMP operations, including: clear, remove, merge, enable, disable, blockdev-backup, drive-backup, or NBD exports.

#3: The "recording" bit generally replaces status=ACTIVE but it can be true concurrently with busy=true. recording means that the bitmap is enabled, and it should be true after block-dirty-bitmap-enable and it should be false after block-dirty-bitmap-disable.

#4: The inconsistent bit is set when a persistent bitmap is not properly written back to qcow2 file. Upon re-loading QEMU, this bitmap should have inconsistent=true and cannot be used for most QMP operations, including: merge, enable, disable, blockdev-backup, drive-backup, or NBD exports. The bitmap should appear as recording=false and busy=false.

Inconsistent bitmaps can be deleted with block_dirty_bitmap_remove, which should also delete it from the qcow2 file.

Inconsistent bitmaps can be cleared with block_dirty_bitmap_clear, which should set inconsistent=false but obviously the bitmap data is lost.

This can be tested by creating a dirty bitmap and simulating an unclean shutdown by using kill -9.

#5: No functional tests needed to verify.

Comment 2 Miroslav Rezanina 2019-04-25 03:52:20 UTC
Fix included in qemu-kvm-rhev-2.12.0-27.el7

Comment 8 aihua liang 2019-04-29 08:24:34 UTC
Verified on qemu-kvm-rhev-2.12.0-27.el7.x86_64, except issue in comment 7 and in bug 1703916, others works ok.

After comment7 confirmed, will set the bug's status to "Verified" and track the left issue by the new reported bugs.

Comment 9 John Snow 2019-04-29 17:18:15 UTC
Ah... I realize that I went out of my way to document that the anonymous bitmaps would not be user-visible, but it's actually not true. They *can* be visible... It's just that you cannot address them with any of the bitmap commands because they do not have a name.

It is probably too late to hide this from the user (as this has been the case for some time), so I will change the documentation to say that anonymous bitmaps MIGHT be visible.

I would say that this is unintentional, but not a bug, and not harmful except that it may serve to confuse.

Thank you,
--John

Comment 10 aihua liang 2019-04-30 02:52:38 UTC
According to comment8 & comment9, set bug's status to "verified". And John will update the doc later.

Comment 12 errata-xmlrpc 2019-08-22 09:20:23 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.

https://access.redhat.com/errata/RHSA-2019:2553


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