From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51646) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqLje-0003Cv-JH for qemu-devel@nongnu.org; Thu, 07 May 2015 09:21:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YqLjY-0007AC-Tg for qemu-devel@nongnu.org; Thu, 07 May 2015 09:21:06 -0400 Date: Thu, 7 May 2015 15:20:56 +0200 From: Kevin Wolf Message-ID: <20150507132056.GC4571@noname.redhat.com> References: <554A1160.7020200@redhat.com> <554A3395.7050509@redhat.com> <554A3D7B.3040603@redhat.com> <554A3F37.9080704@redhat.com> <554A4349.10301@redhat.com> <554A459B.1060505@redhat.com> <554A4E2D.4050300@redhat.com> <554B58A8.6000203@redhat.com> <20150507122911.GB4571@noname.redhat.com> <554B5ED3.4030405@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <554B5ED3.4030405@redhat.com> Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v2 0/3] block: Warn about usage of growing formats over non-growable protocols List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Stefan Hajnoczi , qemu-block@nongnu.org, qemu-devel@nongnu.org, Stefan Hajnoczi , Max Reitz Am 07.05.2015 um 14:47 hat Paolo Bonzini geschrieben: > > > On 07/05/2015 14:29, Kevin Wolf wrote: > > > 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. > > Does ENOSPC over LVM (dm-linear) work at all, and who generates the > ENOSPC there? The LVM use case is what oVirt uses, so I'm pretty sure that it works. I'm now sure who generates the ENOSPC, but it's not qemu anyway. If I had to guess, I'd say that the kernel block layer might just forbid writing after EOF for any block device. Kevin