qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: John Snow <1808928@bugs.launchpad.net>
To: qemu-devel@nongnu.org
Subject: [Bug 1808928] Re: Bitmap Extra data is not supported
Date: Tue, 20 Apr 2021 17:17:06 -0000	[thread overview]
Message-ID: <161893902671.22232.8113269026693095602.malone@gac.canonical.com> (raw)
In-Reply-To: 154511858636.8591.3431958243733477284.malonedeb@gac.canonical.com

my patches went in, ultimately, and my focus was since shifted
elsewhere. I just tried this by *manually* adding some extra data to a
bitmap by hand.


qemu-img create -f qcow2 foo.qcow2 64m
qemu-img bitmap --add foo.qcow2 mybitmap

This creates a bitmap extension header like this (starting at 0x1f8)

000001f0  00 00 00 00 00 00 00 00  23 85 28 75 00 00 00 18  |........#.(u....|
00000200  00 00 00 01 00 00 00 00  00 00 00 00 00 00 00 20  |............... |
00000210  00 00 00 00 00 05 00 00                           |........        |

And a bitmap table that looks like this:

00050000  00 00 00 00 00 04 00 00  00 00 00 01 00 00 00 02  |................|
00050010  01 10 00 08 00 00 00 00  6d 79 62 69 74 6d 61 70  |........mybitmap|

I modified the bitmap table to add eight bytes of bad data:

00050000  00 00 00 00 00 04 00 00  00 00 00 01 00 00 00 02  |................|
00050010  01 10 00 08 00 00 00 08  62 61 64 64 61 74 61 21  |........baddata!|
00050020  6d 79 62 69 74 6d 61 70                           |mybitmap|

And modified the header accordingly to add eight bytes to the table
(0x20f := 0x28):

000001f0  00 00 00 00 00 00 00 00  23 85 28 75 00 00 00 18  |........#.(u....|
00000200  00 00 00 01 00 00 00 00  00 00 00 00 00 00 00 28  |...............(|
00000210  00 00 00 00 00 05 00 00                           |........        |

And in these cases, QEMU refuses to load or work with the image even
slightly, rendering you unable to remove it:

> ./qemu-img bitmap --remove foo.qcow2 mybitmap
qemu-img: Could not open 'foo.qcow2': Bitmap extra data is not supported

So, it's still an open issue.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1808928

Title:
  Bitmap Extra data is not supported

Status in QEMU:
  Incomplete

Bug description:
  i am using dirty bitmaps and drive-backup. It works as aspected.

  Lately, i encounter a disastrous error. There is not any information
  about that situation. I cannot reach/open/attach/info or anything with
  a qcow2 file.

  virsh version
  Compiled against library: libvirt 4.10.0
  Using library: libvirt 4.10.0
  Using API: QEMU 4.10.0
  Running hypervisor: QEMU 2.12.0

  "qemu-img: Could not open '/var/lib/libvirt/images/test.qcow2': Bitmap
  extra data is not supported"

  what is that mean? what should i do?
  i cannot remove bitmap. i cannot open image or query.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1808928/+subscriptions


  parent reply	other threads:[~2021-04-20 17:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-18  7:36 [Qemu-devel] [Bug 1808928] [NEW] Bitmap Extra data is not supported Ali Sag
2019-02-12  1:16 ` [Qemu-devel] [Bug 1808928] " John Snow
2019-02-12 12:49 ` Ali Sag
2019-02-18 19:56 ` John Snow
2019-02-19 10:56 ` Ali Sag
2019-12-23 20:45 ` John Snow
2021-04-20  7:56 ` Thomas Huth
2021-04-20 17:17 ` John Snow [this message]
2021-04-20 17:21 ` John Snow
2021-04-30 17:02 ` Thomas Huth

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=161893902671.22232.8113269026693095602.malone@gac.canonical.com \
    --to=1808928@bugs.launchpad.net \
    --cc=qemu-devel@nongnu.org \
    /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).