Re: [Qemu-devel] qemu-img convert with block driver without .bdrv_create (like iscsi)

2012-10-25 Thread Alexandre DERUMIER
Thanks guys ! I'll try to send a patch next week. Regards, Alexandre - Mail original - De: "ronnie sahlberg" À: "Paolo Bonzini" Cc: "Kevin Wolf" , "Alexandre DERUMIER" , "qemu-devel" Envoyé: Jeudi 25 Octobre 2012 16:00:41 Objet: Re: qemu-img convert with block driver without .bdr

Re: [Qemu-devel] qemu-img convert with block driver without .bdrv_create (like iscsi)

2012-10-25 Thread ronnie sahlberg
On Thu, Oct 25, 2012 at 6:58 AM, Paolo Bonzini wrote: > Il 25/10/2012 15:41, ronnie sahlberg ha scritto: >> On Thu, Oct 25, 2012 at 1:02 AM, Kevin Wolf wrote: >>> Am 25.10.2012 09:52, schrieb Paolo Bonzini: Il 25/10/2012 09:46, Kevin Wolf ha scritto: >>> 1)add a .bdrv_create in block/isc

Re: [Qemu-devel] qemu-img convert with block driver without .bdrv_create (like iscsi)

2012-10-25 Thread Paolo Bonzini
Il 25/10/2012 15:41, ronnie sahlberg ha scritto: > On Thu, Oct 25, 2012 at 1:02 AM, Kevin Wolf wrote: >> Am 25.10.2012 09:52, schrieb Paolo Bonzini: >>> Il 25/10/2012 09:46, Kevin Wolf ha scritto: >> 1)add a .bdrv_create in block/iscsi.c ? >> >> (like host_device block driver, only ope

Re: [Qemu-devel] qemu-img convert with block driver without .bdrv_create (like iscsi)

2012-10-25 Thread Kevin Wolf
Am 25.10.2012 15:41, schrieb ronnie sahlberg: > On Thu, Oct 25, 2012 at 1:02 AM, Kevin Wolf wrote: >> Am 25.10.2012 09:52, schrieb Paolo Bonzini: >>> Il 25/10/2012 09:46, Kevin Wolf ha scritto: >> 1)add a .bdrv_create in block/iscsi.c ? >> >> (like host_device block driver, only open/c

Re: [Qemu-devel] qemu-img convert with block driver without .bdrv_create (like iscsi)

2012-10-25 Thread ronnie sahlberg
On Thu, Oct 25, 2012 at 1:02 AM, Kevin Wolf wrote: > Am 25.10.2012 09:52, schrieb Paolo Bonzini: >> Il 25/10/2012 09:46, Kevin Wolf ha scritto: > 1)add a .bdrv_create in block/iscsi.c ? > > (like host_device block driver, only open/close the device and check if > size if big enoug

Re: [Qemu-devel] qemu-img convert with block driver without .bdrv_create (like iscsi)

2012-10-25 Thread Kevin Wolf
Am 25.10.2012 09:52, schrieb Paolo Bonzini: > Il 25/10/2012 09:46, Kevin Wolf ha scritto: 1)add a .bdrv_create in block/iscsi.c ? (like host_device block driver, only open/close the device and check if size if big enough) >> Yes, this is the right way. > > Could it be a defau

Re: [Qemu-devel] qemu-img convert with block driver without .bdrv_create (like iscsi)

2012-10-25 Thread Paolo Bonzini
Il 25/10/2012 09:46, Kevin Wolf ha scritto: >> > 1)add a .bdrv_create in block/iscsi.c ? >> > >> > (like host_device block driver, only open/close the device and check if >> > size if big enough) > Yes, this is the right way. Could it be a default implementation of .bdrv_create (i.e. something

Re: [Qemu-devel] qemu-img convert with block driver without .bdrv_create (like iscsi)

2012-10-25 Thread Kevin Wolf
Am 25.10.2012 09:25, schrieb Alexandre DERUMIER: > Hello, > > I'm looking to use qemu-img convert to write to iscsi block device > (iscsi://..) > > As iscsi doesn't have .bdrv_create, qemu-img convert hang on [...] > > > What is the best way to get it working ? > > > 1)add a .bdrv_create in

Re: [Qemu-devel] qemu-img convert with block driver without .bdrv_create (like iscsi)

2012-10-25 Thread Paolo Bonzini
Il 25/10/2012 09:25, Alexandre DERUMIER ha scritto: > What is the best way to get it working ? > > 1)add a .bdrv_create in block/iscsi.c ? > > (like host_device block driver, only open/close the device and check if size > if big enough) > > if (fstat(fd, &stat_buf) < 0) > ret = -er

[Qemu-devel] qemu-img convert with block driver without .bdrv_create (like iscsi)

2012-10-25 Thread Alexandre DERUMIER
Hello, I'm looking to use qemu-img convert to write to iscsi block device (iscsi://..) As iscsi doesn't have .bdrv_create, qemu-img convert hang on /* Create the new image */ ret = bdrv_create(drv, out_filename, param); if (ret < 0) { if (ret == -ENOTSUP) { err