From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=52460 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PenGT-0008QV-7A for qemu-devel@nongnu.org; Mon, 17 Jan 2011 06:28:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PenGS-0003vJ-6M for qemu-devel@nongnu.org; Mon, 17 Jan 2011 06:28:49 -0500 Received: from mail-wy0-f173.google.com ([74.125.82.173]:45923) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PenGR-0003vE-UN for qemu-devel@nongnu.org; Mon, 17 Jan 2011 06:28:48 -0500 Received: by wyg36 with SMTP id 36so5377501wyg.4 for ; Mon, 17 Jan 2011 03:28:47 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20110114162057.GA19184@lst.de> References: <20110114162044.GA19114@lst.de> <20110114162057.GA19184@lst.de> Date: Mon, 17 Jan 2011 11:28:47 +0000 Message-ID: Subject: Re: [Qemu-devel] [PATCH 1/3] block: add resize monitor command From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christoph Hellwig Cc: qemu-devel@nongnu.org On Fri, Jan 14, 2011 at 4:20 PM, Christoph Hellwig wrote: > +STEXI > +@item resize > +@findex resize > +Resize a block image while a guest is running. =A0Usuaully requires gues= t s/Usuaully/Usually/ > +action to see the updated size. =A0Resize to a lower size is supported, > +but should be used with extreme caution. This resizes the image files. Resizing an LVM volume is a useful case too. One way to integrate that feature is to implement a host_device .bdrv_truncate() that checks the underlying device size and returns success if it matches the new value and failure otherwise. Or perhaps allow the QEMU resize command without an argument to fetch the size from the underlying device (aka refresh the size). > + =A0 =A0if (bdrv_get_type_hint(bs) =3D=3D BDRV_TYPE_CDROM) { > + =A0 =A0 =A0 =A0error_report("Can not resize CDROM devices\n"); > + =A0 =A0 =A0 =A0return -1; > + =A0 =A0} Hrm...BDRV_TYPE_FLOPPY probably too? Stefan