qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH] nbd: server: Report holes for raw images


From: Eric Blake
Subject: Re: [PATCH] nbd: server: Report holes for raw images
Date: Fri, 19 Feb 2021 10:58:50 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0

On 2/19/21 10:42 AM, Eric Blake wrote:

>> To me, data=false looks compatible with NBD_STATE_HOLE. From user point
>> of view, getting same results from qemu-nbd and qemu-img is more
>> important than being more correct about allocation status.
> 
> More to the point, here is our inconsistency:
> 
> In nbd/server.c, we turn !BDRV_BLOCK_ALLOCATED into NBD_STATE_HOLE
> 
> In block/nbd.c, we turn !NBD_STATE_HOLE into BDRV_BLOCK_DATA
> 
> The fact that we are not doing a round-trip conversion means that one of
> the two places is wrong.  And your argument that the server side is
> wrong makes sense to me.

In fact, when I went back and researched when this was introduced (see
commit e7b1948d51 in 2018), we may have been aware of the inconsistency
between client and server, but didn't make up our minds at the time:
https://lists.gnu.org/archive/html/qemu-devel/2018-03/msg03465.html
"? Hm, don't remember, what we decided about DATA/HOLE flags mapping.."

> 
> I'll wait a few days for any other reviewer commentary before taking
> this through my NBD tree.
> 

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




reply via email to

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