Re: [Qemu-devel] [PATCH] iscsi: add iscsi_truncate support

2013-02-15 Thread Paolo Bonzini
Il 15/02/2013 13:36, Peter Lieven ha scritto: >>> >> Ah, I thought qmp_block_resize did a bdrv_drain_all before calling >>> >> bdrv_truncate. >>> >> >>> >> Maybe it should. Kevin, what do you think? >> > >> > Probably. bdrv_truncate() invalidates the bdrv_check_request() result for >> > in-fligh

Re: [Qemu-devel] [PATCH] iscsi: add iscsi_truncate support

2013-02-15 Thread Peter Lieven
Am 15.02.2013 um 13:18 schrieb Kevin Wolf : > On Fri, Feb 15, 2013 at 12:54:51PM +0100, Paolo Bonzini wrote: >> Il 15/02/2013 12:18, Peter Lieven ha scritto: > > +task = iscsi_readcapacity16_task(iscsilun->iscsi, iscsilun->lun, > + iscsi_readcapaci

Re: [Qemu-devel] [PATCH] iscsi: add iscsi_truncate support

2013-02-15 Thread Kevin Wolf
On Fri, Feb 15, 2013 at 12:54:51PM +0100, Paolo Bonzini wrote: > Il 15/02/2013 12:18, Peter Lieven ha scritto: > >>> > >>> +task = iscsi_readcapacity16_task(iscsilun->iscsi, iscsilun->lun, > >>> + iscsi_readcapacity16_cb, &itask); > >> > >> You can use iscsi_read

Re: [Qemu-devel] [PATCH] iscsi: add iscsi_truncate support

2013-02-15 Thread Peter Lieven
Am 15.02.2013 um 12:54 schrieb Paolo Bonzini : > Il 15/02/2013 12:18, Peter Lieven ha scritto: +task = iscsi_readcapacity16_task(iscsilun->iscsi, iscsilun->lun, + iscsi_readcapacity16_cb, &itask); >>> >>> You can use iscsi_readcapacity16_sync.

Re: [Qemu-devel] [PATCH] iscsi: add iscsi_truncate support

2013-02-15 Thread Paolo Bonzini
Il 15/02/2013 12:18, Peter Lieven ha scritto: >>> >>> +task = iscsi_readcapacity16_task(iscsilun->iscsi, iscsilun->lun, >>> + iscsi_readcapacity16_cb, &itask); >> >> You can use iscsi_readcapacity16_sync. In fact, you probably should >> extract code from iscsi_o

Re: [Qemu-devel] [PATCH] iscsi: add iscsi_truncate support

2013-02-15 Thread Peter Lieven
On 15.02.2013 12:09, Paolo Bonzini wrote: Il 15/02/2013 11:58, Peter Lieven ha scritto: this patch adds iscsi_truncate which effectively allows for online resizing of iscsi volumes. for this to work you have to resize the volume on your storage and then call block_resize command in qemu which wi

Re: [Qemu-devel] [PATCH] iscsi: add iscsi_truncate support

2013-02-15 Thread Paolo Bonzini
Il 15/02/2013 11:58, Peter Lieven ha scritto: > this patch adds iscsi_truncate which effectively allows for online > resizing of iscsi volumes. for this to work you have to resize > the volume on your storage and then call block_resize command > in qemu which will issue a readcapacity16 to update t

[Qemu-devel] [PATCH] iscsi: add iscsi_truncate support

2013-02-15 Thread Peter Lieven
this patch adds iscsi_truncate which effectively allows for online resizing of iscsi volumes. for this to work you have to resize the volume on your storage and then call block_resize command in qemu which will issue a readcapacity16 to update the capacity. Signed-off-by: Peter Lieven --- block