[Top][All Lists]

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

Re: [Qemu-devel] [Qemu-block] [PATCH v2 0/3] block: Warn about usage of

From: Kevin Wolf
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v2 0/3] block: Warn about usage of growing formats over non-growable protocols
Date: Thu, 7 May 2015 16:34:18 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Am 07.05.2015 um 16:16 hat Paolo Bonzini geschrieben:
> On 07/05/2015 16:07, Kevin Wolf wrote:
> > This is not right for two reasons: The first is that this is
> > BlockBackend code
> I think it would take effect for the qemu-nbd case though.

Oh, you want to change the server code rather than the client?

Wait... Are you saying that NBD sends a (platform specific) errno value
over the network? :-/

In theory, what error code the NBD server needs to send should be
specified by the NBD protocol. Am I right to assume that it doesn't do
that? In any case, I'm not sure whether qemu's internal error code
should change just for NBD. Producing the right error code for the
protocol is the job of nbd_co_receive_request().

> > and it wouldn't even take effect for the qcow2 case
> > where we're writing past EOF only on the protocol layer. The second is
> > that -ENOSPC is only for writes and not for reads.
> This is right.
> Reads in the kernel return 0, but in QEMU we do not want that.  The code
> currently returns -EIO, but perhaps -EINVAL is a better match.  It also
> happens to be what Linux returns for discards.

Perhaps it is, yes. It shouldn't make a difference for guests anyway.
(Unlike -ENOSPC for writes, which would trigger werror=enospc! That's
most likely not what we want.)


reply via email to

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