Bug 1993308 - qemu-img convert --bitmaps fail if a bitmap is inconsistent [rhel-8.4.0.z]
Summary: qemu-img convert --bitmaps fail if a bitmap is inconsistent [rhel-8.4.0.z]
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: qemu-kvm
Version: 8.3
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: 8.4
Assignee: Eric Blake
QA Contact: aihua liang
URL:
Whiteboard:
Depends On: 1946084
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-08-12 18:39 UTC by RHEL Program Management Team
Modified: 2021-11-03 08:47 UTC (History)
13 users (show)

Fixed In Version: qemu-kvm-5.2.0-16.module+el8.4.0+13043+9eb47245.11
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1946084
Environment:
Last Closed: 2021-11-03 08:47:19 UTC
Type: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Gitlab redhat/rhel/src/qemu-kvm qemu-kvm merge_requests 42 0 None None None 2021-09-22 17:46:16 UTC
Red Hat Issue Tracker RHELPLAN-93454 0 None None None 2021-08-12 18:41:06 UTC

Comment 1 Klaus Heinrich Kiwi 2021-08-24 17:44:08 UTC
Eric, can you post the backport to 8.4.z?

Thanks

Comment 2 CongLi 2021-09-18 02:30:54 UTC
Hi Eric,

Can you please confirm which batch update this bug will be targeted for?

Thanks.

Comment 3 Nir Soffer 2021-09-19 11:58:14 UTC
We need to know if this will be available in the next 8.4.z update, so we can
require a version with the fix for RHV 4.4.9.

Comment 4 Eric Blake 2021-09-20 20:46:11 UTC
Patches posted downstream:
https://mailman-int.corp.redhat.com/archives/rhvirt-patches/2021-September/msg00069.html

Comment 8 aihua liang 2021-10-25 09:28:29 UTC
Test on qemu-kvm-5.2.0-16.module+el8.4.0+13043+9eb47245.11, the problem has been resolved.

Test Env:
  Kernel version:4.18.0-305.el8.x86_64
  qemu-kvm version:qemu-kvm-5.2.0-16.module+el8.4.0+13043+9eb47245.11

Test Steps:
 1.Create a qcow2 image
   #qemu-img create -f qcow2 /home/data.qcow2 2G

 2.Add a persistent bitmap offline
   #qemu-img bitmap /home/data.qcow2 --add bitmap_persistent

 3.Expose the persistent bitmap via qemu-nbd
   #qemu-nbd -t -p 10098 /home/data.qcow2 -B bitmap_persistent

 4.Kill qemu-nbd
   #kill -9 $pid_qemu_nbd

 5.Check image info of data.qcow2
   # qemu-img info /home/data.qcow2 
image: /home/data.qcow2
file format: qcow2
virtual size: 2 GiB (2147483648 bytes)
disk size: 324 KiB
cluster_size: 65536
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    bitmaps:
        [0]:
            flags:
                [0]: in-use
                [1]: auto
            name: bitmap_persistent
            granularity: 65536
    refcount bits: 16
    corrupt: false
    extended l2: false

  6.Add a new persistent bitmap to /home/data.qcow2
    #qemu-img bitmap /home/data.qcow2 --add bitmap_add

  7.Check image info of /home/data.qcow2
    #qemu-img info /home/data.qcow2 
image: /home/data.qcow2
file format: qcow2
virtual size: 2 GiB (2147483648 bytes)
disk size: 452 KiB
cluster_size: 65536
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    bitmaps:
        [0]:
            flags:
                [0]: in-use
                [1]: auto
            name: bitmap_persistent
            granularity: 65536
        [1]:
            flags:
                [0]: auto
            name: bitmap_add
            granularity: 65536
    refcount bits: 16
    corrupt: false
    extended l2: false

 8.Convert image with all bitmaps
   #qemu-img convert -O qcow2 /home/data.qcow2 /home/test/data_new.qcow2 --bitmaps
qemu-img: Cannot copy inconsistent bitmap 'bitmap_persistent'
Try --skip-broken-bitmaps, or use 'qemu-img bitmap --remove' to delete it

 9.Convert image with inconsistent bitmap skipped.
   #qemu-img convert -O qcow2 /home/data.qcow2 /home/test/data_new.qcow2 --bitmaps --skip-broken-bitmaps
qemu-img: warning: Skipping inconsistent bitmap 'bitmap_persistent'

 10.Check image info of converted image
   #qemu-img info /home/test/data_new.qcow2 
image: /home/test/data_new.qcow2
file format: qcow2
virtual size: 2 GiB (2147483648 bytes)
disk size: 324 KiB
cluster_size: 65536
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    bitmaps:
        [0]:
            flags:
                [0]: auto
            name: bitmap_add
            granularity: 65536
    refcount bits: 16
    corrupt: false
    extended l2: false

Comment 10 errata-xmlrpc 2021-11-03 08:47:19 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 (Moderate: virt:av and virt-devel:av security and bug fix update), 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-2021:4112


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