Received: from eggs.gnu.org ([208.118.235.92]:58909) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRccA-0000Jx-9b for qemu-devel@nongnu.org; Fri, 26 Oct 2012 01:37:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TRcc8-0006m0-UI for qemu-devel@nongnu.org; Fri, 26 Oct 2012 01:37:50 -0400 Received: from mailpro.odiso.net ([89.248.209.98]:55028) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRcc8-0006lp-Ll for qemu-devel@nongnu.org; Fri, 26 Oct 2012 01:37:48 -0400 Date: Fri, 26 Oct 2012 07:37:18 +0200 (CEST) From: Alexandre DERUMIER Message-ID: <9b987053-e8a3-490f-84e1-50064b7fd5fb@mailpro> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [Qemu-devel] qemu-img convert with block driver without .bdrv_create (like iscsi) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: ronnie sahlberg Cc: Kevin Wolf , Paolo Bonzini , qemu-devel Thanks guys ! I'll try to send a patch next week. Regards, Alexandre ----- Mail original ----- De: "ronnie sahlberg" =C3=80: "Paolo Bonzini" Cc: "Kevin Wolf" , "Alexandre DERUMIER" , "qemu-devel" Envoy=C3=A9: Jeudi 25 Octobre 2012 16:00:41 Objet: Re: qemu-img convert with block driver without .bdrv_create (like is= csi) 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/iscsi.c ? >>>>>>> >>>>>>> (like host_device block driver, only open/close the device and chec= k if size if big enough) >>>>> Yes, this is the right way. >>>> >>>> Could it be a default implementation of .bdrv_create (i.e. something >>>> you'd do in bdrv_create if the protocol doesn't have it)? >>> >>> No, there are block drivers that really can't create images. They shoul= d >>> keep failing. >> >> Technically, you can not create new LUNs via the iscsi protocol >> itself, you can only access pre-existing luns >> that have been created by some out-of-band method. >> >> So basically, with iscsi you can only ever access already preexisting lu= ns. >> >> In that case I think requiring a .bdrv_create feels wrong. We are not >> creating a new LUN here but just opening an already existing LUN. > > The problem is that bdrv_create is overloaded to mean both "create the > backing storage" and "format the image". Only the latter applies to > iSCSI and, in general, as far as protocols are concerned bdrv_create is > usually a no-op. > > However, Kevin said he prefers to have an explicit override of > bdrv_create for iSCSI. Can you implement that? (I'll then do the same > for NBD). > Yepp. Since there is consensus. We can do a .bdrv_create for iscsi.c regards ronnie sahlberg