From: Eric Blake <eblake@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
qemu-block@nongnu.org, Max Reitz <mreitz@redhat.com>
Subject: Re: [PATCH 1/5] iotests: Update 241 to expose backing layer fragmentation
Date: Thu, 25 Feb 2021 09:52:53 -0600 [thread overview]
Message-ID: <5a39103c-0688-5bb2-1f15-13c87d8f7892@redhat.com> (raw)
In-Reply-To: <b471d0e3-b7cc-f62f-25a7-d7d59fe6093c@virtuozzo.com>
On 2/25/21 8:57 AM, Vladimir Sementsov-Ogievskiy wrote:
> 25.02.2021 16:50, Vladimir Sementsov-Ogievskiy wrote:
>> 18.02.2021 23:15, Eric Blake wrote:
>>> Previous commits (such as 6e280648, 75d34eb9) have mentioned that our
>>> NBD server still sends unaligned fragments when an active layer with
>>> large advertised minimum block size is backed by another layer with a
>>> smaller block size. Expand the test to actually cover these scenario,
>>> by using two different approaches: qcow2 encryption (which forces
>>> 512-byte alignment) with an unaligned raw backing file, and blkdebug
>>> with a 4k alignment.
>>>
>
> Now I don't think that aligning qemu:allocation-depth information is a
> correct thing to do.
Why not? First, it's very rare that you'd have a qcow2 image with
mandated 4k minimum block size, backed by another qcow2 image with 512
block size (blkdebug made it possible to expose the bug, but I could not
find a way in common day-to-day usage), so we really aren't impacting
normal users. Second, from the perspective of copying backing chains
over NBD, what difference does it make if we have the backing chain:
A (granularity 512) <- B (granularity 512) <- C (granularity 4k)
with the allocation pattern:
A: -A-A-A-A-A-A-A-A
B: --BB--BB--BB--BB
C: --------CCCCCCCC
and report the allocation depth as:
2222222211111111
instead of
0322032211111111
The former may be imprecise, but it obeys our bounds, and in all
reality, if all we have access to is 4k chunks, any decisions we make
about how to handle that 4k block should be based on the fact that at
least some of the data was allocated in our backing file, and not
treating the entire 4k as unallocated merely because the first 512 bytes
are neither in A nor B.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
next prev parent reply other threads:[~2021-02-25 15:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-18 20:15 [PATCH 0/5] Obey NBD spec regarding block size bounds on reply Eric Blake
2021-02-18 20:15 ` [PATCH 1/5] iotests: Update 241 to expose backing layer fragmentation Eric Blake
2021-02-25 13:50 ` Vladimir Sementsov-Ogievskiy
2021-02-25 14:57 ` Vladimir Sementsov-Ogievskiy
2021-02-25 15:52 ` Eric Blake [this message]
2021-02-25 16:04 ` Vladimir Sementsov-Ogievskiy
2021-02-25 15:46 ` Eric Blake
2021-02-18 20:15 ` [PATCH 2/5] block: Fix BDRV_BLOCK_RAW status to honor alignment Eric Blake
2021-02-25 14:55 ` Vladimir Sementsov-Ogievskiy
2021-02-25 16:03 ` Eric Blake
2021-02-25 16:23 ` Vladimir Sementsov-Ogievskiy
2021-02-18 20:15 ` [PATCH 3/5] nbd/server: Avoid unaligned read/block_status from backing Eric Blake
2021-02-18 20:15 ` [PATCH 4/5] nbd/server: Avoid unaligned dirty-bitmap status Eric Blake
2021-02-18 20:15 ` [PATCH 5/5] do not apply: Revert "nbd-client: Work around server BLOCK_STATUS misalignment at EOF" Eric Blake
2021-02-18 20:33 ` [PATCH 0/5] Obey NBD spec regarding block size bounds on reply no-reply
2021-02-18 20:40 ` Eric Blake
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=5a39103c-0688-5bb2-1f15-13c87d8f7892@redhat.com \
--to=eblake@redhat.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).