All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Nir Soffer <nirsof@gmail.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Nir Soffer <nsoffer@redhat.com>,
	Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	qemu-block@nongnu.org, Max Reitz <mreitz@redhat.com>
Subject: Re: [PATCH] nbd: server: Report holes for raw images
Date: Fri, 19 Feb 2021 10:58:50 -0600	[thread overview]
Message-ID: <81464e3d-c0ee-ac12-c43b-d0f7180db482@redhat.com> (raw)
In-Reply-To: <f136b2e8-3510-a150-27f9-e69ba14e39aa@redhat.com>

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	other threads:[~2021-02-19 17:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-19 16:07 [PATCH] nbd: server: Report holes for raw images Nir Soffer
2021-02-19 16:42 ` Eric Blake
2021-02-19 16:58   ` Eric Blake [this message]
2021-02-25 18:50     ` Vladimir Sementsov-Ogievskiy
2021-03-03 21:45       ` Nir Soffer
2021-03-03 21:51         ` Eric Blake
2021-03-04 12:22       ` Kevin Wolf
2021-02-25 18:15 ` Vladimir Sementsov-Ogievskiy

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=81464e3d-c0ee-ac12-c43b-d0f7180db482@redhat.com \
    --to=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=nirsof@gmail.com \
    --cc=nsoffer@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.