From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37528) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yq2Tt-0003pZ-KH for qemu-devel@nongnu.org; Wed, 06 May 2015 12:47:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yq2Tp-0006be-HZ for qemu-devel@nongnu.org; Wed, 06 May 2015 12:47:33 -0400 Message-ID: <554A459B.1060505@redhat.com> Date: Wed, 06 May 2015 18:47:23 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1426791801-9042-1-git-send-email-mreitz@redhat.com> <20150505094606.GB29818@stefanha-thinkpad.redhat.com> <554A1160.7020200@redhat.com> <554A3395.7050509@redhat.com> <554A3D7B.3040603@redhat.com> <554A3F37.9080704@redhat.com> <554A4349.10301@redhat.com> In-Reply-To: <554A4349.10301@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit 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: Max Reitz , Stefan Hajnoczi Cc: Stefan Hajnoczi , qemu-devel@nongnu.org, qemu-block@nongnu.org On 06/05/2015 18:37, Max Reitz wrote: > Because qcow2 tries to write beyond the end of the file; the NBD client > implementation passes that on to the server, and the server simply > reports an error (which the NBD client turns into EIO). Where? qemu_coroutine_yield(); *reply = s->reply; if (reply->handle != request->handle) { reply->error = EIO; } else { if (qiov && reply->error == 0) { ret = qemu_co_recvv(s->sock, qiov->iov, qiov->niov, offset, request->len); if (ret != request->len) { reply->error = EIO; } } /* Tell the read handler to read another header. */ s->reply.handle = 0; } It should get into the "else" and then see reply->error != 0. So the guest should see ENOSPC. >> Can you check if virtio-scsi >> gives ENOSPC? > > In which configuration? Using virtio-scsi on top of qcow2 on top of some > SCSI passthrough block driver? Sounds like we ought to make NBD return > ENOSPC no matter the fate of this series. virtio-scsi on top of qcow2 on top of NBD. No passthrough: "-device scsi-disk" should work. It seems to me that NBD _should_ be getting ENOSPC, unless it's nbd-server that throws away the error. > The problem with only warning for a certain non-default configuration is > that people who don't know what they are doing are more likely to use > the default configuration, so I'd like the warning to appear then. That's entirely true. Perhaps the werror default should be changed from enospc to report after all! Paolo