From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:59372) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qz7td-0003Gy-Cz for qemu-devel@nongnu.org; Thu, 01 Sep 2011 10:05:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qz7tY-00088P-Pw for qemu-devel@nongnu.org; Thu, 01 Sep 2011 10:05:33 -0400 Received: from verein.lst.de ([213.95.11.211]:40971 helo=newverein.lst.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qz7tY-00088B-Ko for qemu-devel@nongnu.org; Thu, 01 Sep 2011 10:05:28 -0400 Date: Thu, 1 Sep 2011 16:05:26 +0200 From: Christoph Hellwig Message-ID: <20110901140526.GA9388@lst.de> References: <20110901132755.GG14462@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110901132755.GG14462@redhat.com> Subject: Re: [Qemu-devel] QEMU online guest disk resize wrt host block devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: qemu-devel@nongnu.org, hch@lst.de On Thu, Sep 01, 2011 at 02:27:55PM +0100, Daniel P. Berrange wrote: > I see two likely approaches: > > 1. Add a parameter to the existing 'block_resize' command > 'refreshonly=true|false' > > 2. Add a separate command 'block_refresh' I think all that you need is a to implement a bdrv_truncate method for host devices that simply checks if the new size smaller or equal to the device size, and return 0 in that case or an error otherwise.