[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 14:29:11 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Am 07.05.2015 um 14:20 hat Paolo Bonzini geschrieben:
> On 06/05/2015 19:23, Max Reitz wrote:
> > The guest sees whatever has been written into reply->error, and that
> > field hasn't been written by this function in that case. It has been
> > written by nbd_receive_reply() in nbd.c, and that value comes directly
> > from the server. In case of qemu-nbd being the server, a write beyond
> > the EOF should be caught by blk_check_byte_request() in
> > block/block-backend.c, which returns -EIO. So that's where the EIO comes
> > from.
> Fair enough.  This makes sense, but then we have to create ENOSPC elsewhere.
> > I don't know whether this EIO is subsequently converted to ENOSPC
> > because of werror=enospc, but considering that
> > https://bugzilla.redhat.com/show_bug.cgi?id=1090713 did not override
> > werror, it doesn't look like it.
> No, it shouldn't indeed.
> Could alloc_clusters_noref do bdrv_truncate and return ENOSPC if it
> fails?  That's how for example qcow and vhdx work.  vdi has the same
> problem.

If you want NBD to return -ENOSPC for writes after EOF, change the
nbd block driver to do just that. There's no reason to add additional
overhead to qcow2 (even over raw-posix) for that.


reply via email to

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