From: Max Reitz <mreitz@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v13 03/14] qcow2: Optimize bdrv_make_empty()
Date: Thu, 23 Oct 2014 11:44:38 +0200 [thread overview]
Message-ID: <5448CE06.2050706@redhat.com> (raw)
In-Reply-To: <20141023094259.GG3522@noname.redhat.com>
On 2014-10-23 at 11:42, Kevin Wolf wrote:
> Am 23.10.2014 um 11:11 hat Max Reitz geschrieben:
>>>>> Leaves the question, is it worth the hassle?
>>>> Probably not. Would you be fine with setting bs->drv to NULL in the
>>>> problematic error paths?
>>> By calling qcow2_signal_corruption(), right? I think that's fine.
>> I don't know. The image isn't corrupted, it's just dirty. When you
>> open it, it'll work fine. I'd just output an own error here and set
>> bs->drv to NULL.
> Okay.
>
>>> What about the assumption that 3 + l1_size fits in one refcount block?
>>> Do we need to check it even now?
>> The alternative would be not to allocate 3 + l1_size, but rather
>> just 3. Then we have a working refcount structure and that's the
>> most important thing (the L1 table is not yet accounted for, but
>> repair can fix that).
>>
>> Afterwards, we allocate the L1 table. With this change, we don't
>> know its offset yet, so we may have to change it again. But we can
>> easily do that by just setting s->l1_size to 0 and call
>> qcow2_grow_l1_table().
> How do you make sure that the L1 table always stays zeroed then?
Details...
> And seriously, if you have an L1 table that doesn't fit in one refcount
> block, you're doing something wrong and deserve the slow fallback.
Probably so, yes.
> Or, if we really want, we could zero out 2 + l1_size + num_rb clusters
> and hook up multiple refcount blocks. The new limit would then be at the
> point where the refcount table exceeds a cluster.
Well, if we're falling back to maths, v11 is always there. :-P
Max
next prev parent reply other threads:[~2014-10-23 9:44 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-22 12:51 [Qemu-devel] [PATCH v13 00/14] qemu-img: Implement commit like QMP Max Reitz
2014-10-22 12:51 ` [Qemu-devel] [PATCH v13 01/14] qcow2: Allow "full" discard Max Reitz
2014-10-22 12:51 ` [Qemu-devel] [PATCH v13 02/14] qcow2: Implement bdrv_make_empty() Max Reitz
2014-10-22 12:51 ` [Qemu-devel] [PATCH v13 03/14] qcow2: Optimize bdrv_make_empty() Max Reitz
2014-10-22 16:04 ` Eric Blake
2014-10-22 18:35 ` Kevin Wolf
2014-10-23 7:46 ` Max Reitz
2014-10-23 8:29 ` Kevin Wolf
2014-10-23 8:36 ` Max Reitz
2014-10-23 8:41 ` Kevin Wolf
2014-10-23 9:11 ` Max Reitz
2014-10-23 9:42 ` Kevin Wolf
2014-10-23 9:44 ` Max Reitz [this message]
2014-10-22 12:51 ` [Qemu-devel] [PATCH v13 04/14] blockjob: Introduce block_job_complete_sync() Max Reitz
2014-10-22 12:51 ` [Qemu-devel] [PATCH v13 05/14] blockjob: Add "ready" field Max Reitz
2014-10-23 10:01 ` Kevin Wolf
2014-10-22 12:51 ` [Qemu-devel] [PATCH v13 06/14] iotests: Omit length/offset test in 040 and 041 Max Reitz
2014-10-23 10:06 ` Kevin Wolf
2014-10-23 10:07 ` Max Reitz
2014-10-22 12:51 ` [Qemu-devel] [PATCH v13 07/14] block/mirror: Improve progress report Max Reitz
2014-10-23 10:52 ` Kevin Wolf
2014-10-23 11:09 ` Max Reitz
2014-10-23 12:03 ` Kevin Wolf
2014-10-23 13:10 ` Eric Blake
2014-10-22 12:51 ` [Qemu-devel] [PATCH v13 08/14] qemu-img: Implement commit like QMP Max Reitz
2014-10-22 16:22 ` Eric Blake
2014-10-23 11:59 ` Kevin Wolf
2014-10-23 12:35 ` Max Reitz
2014-10-23 12:40 ` Kevin Wolf
2014-10-23 12:44 ` Max Reitz
2014-10-22 12:51 ` [Qemu-devel] [PATCH v13 09/14] qemu-img: Empty image after commit Max Reitz
2014-10-23 12:55 ` Kevin Wolf
2014-10-22 12:51 ` [Qemu-devel] [PATCH v13 10/14] qemu-img: Enable progress output for commit Max Reitz
2014-10-23 13:00 ` Kevin Wolf
2014-10-22 12:51 ` [Qemu-devel] [PATCH v13 11/14] qemu-img: Specify backing file " Max Reitz
2014-10-23 13:05 ` Kevin Wolf
2014-10-22 12:51 ` [Qemu-devel] [PATCH v13 12/14] iotests: Add _filter_qemu_img_map Max Reitz
2014-10-23 13:08 ` Kevin Wolf
2014-10-22 12:51 ` [Qemu-devel] [PATCH v13 13/14] iotests: Add test for backing-chain commits Max Reitz
2014-10-23 13:24 ` Kevin Wolf
2014-10-22 12:51 ` [Qemu-devel] [PATCH v13 14/14] iotests: Add test for qcow2's bdrv_make_empty Max Reitz
2014-10-22 17:05 ` Eric Blake
2014-10-23 13:30 ` 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=5448CE06.2050706@redhat.com \
--to=mreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.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).