From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LPLI5-0003TU-Ou for qemu-devel@nongnu.org; Tue, 20 Jan 2009 13:25:33 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LPLI4-0003Qu-A7 for qemu-devel@nongnu.org; Tue, 20 Jan 2009 13:25:33 -0500 Received: from [199.232.76.173] (port=35554 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPLI4-0003Qf-0w for qemu-devel@nongnu.org; Tue, 20 Jan 2009 13:25:32 -0500 Received: from mx2.redhat.com ([66.187.237.31]:37735) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LPLI3-0001TX-HC for qemu-devel@nongnu.org; Tue, 20 Jan 2009 13:25:31 -0500 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n0KIPUQi029327 for ; Tue, 20 Jan 2009 13:25:30 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n0KIPVcY000603 for ; Tue, 20 Jan 2009 13:25:31 -0500 Received: from dhcp-1-237.tlv.redhat.com (dhcp-1-237.tlv.redhat.com [10.35.1.237]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n0KIPUaU012980 for ; Tue, 20 Jan 2009 13:25:30 -0500 Date: Tue, 20 Jan 2009 20:23:44 +0200 From: Gleb Natapov Subject: Re: [Qemu-devel] [PATCH v4] Stop VM on ENOSPC error. Message-ID: <20090120182344.GA12718@redhat.com> References: <20090120105610.GB27675@redhat.com> <18805.55601.339210.692083@mariner.uk.xensource.com> <20090120141651.GF27675@redhat.com> <18805.58968.356765.658443@mariner.uk.xensource.com> <20090120153159.GA8319@redhat.com> <18806.198.448290.48055@mariner.uk.xensource.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18806.198.448290.48055@mariner.uk.xensource.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Tue, Jan 20, 2009 at 04:50:14PM +0000, Ian Jackson wrote: > Gleb Natapov writes ("Re: [Qemu-devel] [PATCH v4] Stop VM on ENOSPC error."): > > I would like to abolish the blocking calls from all file formats, but in > > reality it is almost impossible. Qcow2 metadata updates is a big mess to > > do asynchronously. The best thing we can do is to move it to another thread. > > Err, I wasn't suggesting it should be done in each format in that way. > It could be done once in block.c, before the specific format write > method is called. > Before? How should we know before specific format write if there is enough space? And block.c is called by different file formats too. So what do you suggest to do inside bdrv_write() function when write failed? > So the formats would still write synchronously, and would pass errors > up to their parent formats, until it reenters the generic block code > where the retry would take place. At that point the call from the > device emulation would necessariy be asynchronous. > It may reenter block formats many times during one write from ide. Look at block-qcow2.c and calls to bdrv_pwrite() there. -- Gleb.