From: Eric Blake <eblake@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
qemu-block@nongnu.org
Cc: kwolf@redhat.com, den@openvz.org, ktkhai@virtuozzo.com,
qemu-devel@nongnu.org, mreitz@redhat.com
Subject: Re: [PATCH] qcow2: set bdi->is_dirty
Date: Tue, 4 May 2021 11:20:42 -0500 [thread overview]
Message-ID: <1e28df3d-02e9-54ef-9497-3f06ecc92d4c@redhat.com> (raw)
In-Reply-To: <20210504160656.462836-1-vsementsov@virtuozzo.com>
On 5/4/21 11:06 AM, Vladimir Sementsov-Ogievskiy wrote:
> Set bdi->is_dirty, so that qemu-img info could show dirty flag.
>
> After this commit the following check will show '"dirty-flag": true':
>
> ./build/qemu-img create -f qcow2 -o lazy_refcounts=on x 1M
> ./build/qemu-io x
> qemu-io> write 0 1M
>
> After "write" command success, kill the qemu-io process:
>
> kill -9 <qemu-io pid>
>
> ./build/qemu-img info --output=json x
>
> This will show '"dirty-flag": true' among other things. (before this
> commit it shows '"dirty-flag": false')
>
> Note, that qcow2's dirty-bit is not a "dirty bit for the image". It
> only protects qcow2 lazy refcounts feature. So, there are a lot of
> conditions when qcow2 session may be not closed correctly, but bit is
> 0. Still, when bit is set, the last session is definitely not finished
> correctly and it's better to report it.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> ---
> block/qcow2.c | 1 +
> 1 file changed, 1 insertion(+)
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
next prev parent reply other threads:[~2021-05-04 16:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-04 16:06 [PATCH] qcow2: set bdi->is_dirty Vladimir Sementsov-Ogievskiy
2021-05-04 16:20 ` Eric Blake [this message]
2021-05-04 16:58 ` Kirill Tkhai
2021-05-05 10:10 ` Kevin Wolf
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=1e28df3d-02e9-54ef-9497-3f06ecc92d4c@redhat.com \
--to=eblake@redhat.com \
--cc=den@openvz.org \
--cc=ktkhai@virtuozzo.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=vsementsov@virtuozzo.com \
/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).