From: Kevin Wolf <kwolf@redhat.com>
To: Alberto Garcia <berto@igalia.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org,
Max Reitz <mreitz@redhat.com>, Eric Blake <eblake@redhat.com>,
jsnow@redhat.com
Subject: Re: [Qemu-devel] [PATCH for-2.12 v2] qcow2: Reset free_cluster_index when allocating a new refcount block
Date: Wed, 21 Mar 2018 16:40:00 +0100 [thread overview]
Message-ID: <20180321154000.GD3898@localhost.localdomain> (raw)
In-Reply-To: <w51h8p9igv1.fsf@maestria.local.igalia.com>
Am 21.03.2018 um 16:32 hat Alberto Garcia geschrieben:
> On Wed 21 Mar 2018 04:07:28 PM CET, Kevin Wolf wrote:
> > I just remembered that when I looked at an image recently, I noticed
> > that the refcount block wasn't in the first cluster and I disliked it,
> > though mostly because it felt untidy rather than being a problem.
>
> I don't think you can fix that in general. In my test case I'm writing
> new data when the existing refcount block is already full, so we can
> allocate the new one before the new data and keep everything tidy.
>
> But if there are, say, two refcount entries available and you write four
> data clusters you don't want the new refcount block in the middle of
> those four clusters just to have it at the beginning :-)
Agreed. I think if implemented like I suggested (hard error in
update_refcount() and then allocate a new refcount block in the caller),
we'd actually end up with the refcount block covered by an old refcount
block rather than being self-describing. And that in turn wouldn't make
things much tidier, so I guess you're right. :-)
> > Having a qcow2 analysis script in the repo sounds like a good
> > idea. John has something, too. Maybe we can check whether the two
> > things complement each other and then check in a script that combines
> > both (or if one provides a superset of the other, just check in that
> > one).
>
> I'll take a look.
Thanks!
Kevin
next prev parent reply other threads:[~2018-03-21 15:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-21 13:38 [Qemu-devel] [PATCH for-2.12 v2] qcow2: Reset free_cluster_index when allocating a new refcount block Alberto Garcia
2018-03-21 13:52 ` Kevin Wolf
2018-03-21 14:10 ` Alberto Garcia
2018-03-21 15:07 ` Kevin Wolf
2018-03-21 15:32 ` Alberto Garcia
2018-03-21 15:40 ` Kevin Wolf [this message]
2018-03-21 17:52 ` 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=20180321154000.GD3898@localhost.localdomain \
--to=kwolf@redhat.com \
--cc=berto@igalia.com \
--cc=eblake@redhat.com \
--cc=jsnow@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--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).