Re: [Qemu-devel] QEMU online guest disk resize wrt host block devices

2011-09-05 Thread Kevin Wolf
Am 01.09.2011 17:56, schrieb Christoph Hellwig: > On Thu, Sep 01, 2011 at 03:27:35PM +0100, Daniel P. Berrange wrote: >> One other question too, when creating a qcow2 image via 'qemu-img create' >> you can specify a 'prealloc' option to require metadata to be allocated >> at time of creation. >> >>

Re: [Qemu-devel] QEMU online guest disk resize wrt host block devices

2011-09-02 Thread Daniel P. Berrange
On Thu, Sep 01, 2011 at 05:55:43PM +0200, Christoph Hellwig wrote: > Please try the attached (untested) patch: Yes, this patch worked succesfully with the following test case: $ dd if=/dev/zero of=loop.img bs=1M seek=100 count=0 $ losetup -f loop.img $ ./x86_64-softmmu/qemu-system-x86_64 -

Re: [Qemu-devel] QEMU online guest disk resize wrt host block devices

2011-09-01 Thread Christoph Hellwig
On Thu, Sep 01, 2011 at 03:27:35PM +0100, Daniel P. Berrange wrote: > One other question too, when creating a qcow2 image via 'qemu-img create' > you can specify a 'prealloc' option to require metadata to be allocated > at time of creation. > > Should we have the same control at time of resize too

Re: [Qemu-devel] QEMU online guest disk resize wrt host block devices

2011-09-01 Thread Christoph Hellwig
Please try the attached (untested) patch: Index: qemu/block/raw-posix.c === --- qemu.orig/block/raw-posix.c 2011-09-01 17:37:42.579651525 +0200 +++ qemu/block/raw-posix.c 2011-09-01 17:43:28.882967337 +0200 @@ -645,10 +645,23 @@

Re: [Qemu-devel] QEMU online guest disk resize wrt host block devices

2011-09-01 Thread Daniel P. Berrange
On Thu, Sep 01, 2011 at 04:05:26PM +0200, Christoph Hellwig wrote: > 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

Re: [Qemu-devel] QEMU online guest disk resize wrt host block devices

2011-09-01 Thread Daniel P. Berrange
On Thu, Sep 01, 2011 at 02:27:55PM +0100, Daniel P. Berrange wrote: > We want to support online resize of guest disks in the libvirt API for > QEMU, and had intended to use the fairly recently added 'block_resize' > command: > > commit db97ee6a976bacbb0d18818e951cfc41b39269a7 > Author: Christo

Re: [Qemu-devel] QEMU online guest disk resize wrt host block devices

2011-09-01 Thread Christoph Hellwig
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_trun

[Qemu-devel] QEMU online guest disk resize wrt host block devices

2011-09-01 Thread Daniel P. Berrange
We want to support online resize of guest disks in the libvirt API for QEMU, and had intended to use the fairly recently added 'block_resize' command: commit db97ee6a976bacbb0d18818e951cfc41b39269a7 Author: Christoph Hellwig Date: Mon Jan 24 13:32:41 2011 +0100 block: tell drivers a