qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH v3 00/12] block: Deal with filters


From: Eric Blake
Subject: Re: [Qemu-block] [PATCH v3 00/12] block: Deal with filters
Date: Mon, 1 Apr 2019 15:18:07 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.0

On 2/13/19 4:52 PM, Max Reitz wrote:
> Note: This is technically the first part of my active mirror followup.
> But just very technically.  I noticed that that followup started to
> consist of two parts, namely (A) fix filtery things in the block layer,
> and (B) fix active mirror.  So I decided to split it.  This is part A.
> Part B is “mirror: Mainly coroutine refinements”.
> 
> 
> When we introduced filters, we did it a bit casually.  Sure, we talked a
> lot about them before, but that was mostly discussion about where
> implicit filters should be added to the graph (note that we currently
> only have two implicit filters, those being mirror and commit).  But in
> the end, we really just designated some drivers filters (Quorum,
> blkdebug, etc.) and added some specifically (throttle, COR), without
> really looking through the block layer to see where issues might occur.
> 
> It turns out vast areas of the block layer just don’t know about filters
> and cannot really handle them.  Many cases will work in practice, in
> others, well, too bad, you cannot use some feature because some part
> deep inside the block layer looks at your filters and thinks they are
> format nodes.

In fact, I've hit one of those cases in trying to fix an NBD bug. If you
have: A <- B, where NBD is serving file B with forced 512-byte (or
larger) alignment, but file A has 1-byte alignment, then file A can
change status mid-sector, but file B should not advertise that
mid-sector change to the client.  So my naive thought of how to test that:

printf %01000d 0 > "$TEST_IMG_FILE"
$QEMU_IMG create -f qcow2 -b "$TEST_IMG_FILE" -F raw \
          "$TEST_IMG_FILE.qcow2" 16k | _filter_img_create
nbd_server_start_unix_socket --image-opts "driver=blkdebug,align=512,\
image.driver=qcow2,image.file.driver=file,\
image.file.filename=$TEST_IMG_FILE.qcow2"

But as long as blkdebug does not know about qcow2's backing images, it
reports the entire qcow2 file as unallocated instead of seeing the
unaligned allocation from the backing file.

On the bright side, your series looks like it should fix it (although I
was unable to get it to apply cleanly to quickly test).

Hmm - maybe I can get away without needing blkdebug - qcow2 forces
512-byte alignment if it is encrypted, so if I create the overlay file
with encryption...

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]