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

2013-02-18 Thread Paolo Bonzini
Il 18/02/2013 13:58, Peter Lieven ha scritto: > > -switch (iscsilun->type) { > -case TYPE_DISK: > -task = iscsi_readcapacity16_sync(iscsi, iscsilun->lun); > -if (task == NULL || task->status != SCSI_STATUS_GOOD) { > -error_report("iSCSI: failed to send readcapac

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

2013-02-18 Thread Paolo Bonzini
Il 18/02/2013 14:04, Peter Lieven ha scritto: >>> >> >> I didn't write to *remove* the switch statement, I wrote to *move* it >> into a new function and use it from iscsi_truncate. > > Sorry, not enough sleep. However, truncate makes only sense for lun type > disk, doesn't it? I think so, mostly

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

2013-02-18 Thread Peter Lieven
On 18.02.2013 14:01, Paolo Bonzini wrote: Il 18/02/2013 13:58, Peter Lieven ha scritto: -switch (iscsilun->type) { -case TYPE_DISK: -task = iscsi_readcapacity16_sync(iscsi, iscsilun->lun); -if (task == NULL || task->status != SCSI_STATUS_GOOD) { -error_report

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

2013-02-18 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. v3: - remove switch statement in iscsi