From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37097) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XdYmH-0008KT-FM for qemu-devel@nongnu.org; Mon, 13 Oct 2014 02:06:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XdYmC-0000kK-VO for qemu-devel@nongnu.org; Mon, 13 Oct 2014 02:06:41 -0400 Received: from mailpro.odiso.net ([89.248.209.98]:46572) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XdYmC-0000kB-MC for qemu-devel@nongnu.org; Mon, 13 Oct 2014 02:06:36 -0400 Date: Mon, 13 Oct 2014 08:06:29 +0200 (CEST) From: Alexandre DERUMIER Message-ID: <9fe0fedc-802d-4838-b738-c3d0932eeeda@mailpro> In-Reply-To: <543A7BD4.4030601@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [Qemu-devel] qemu drive-mirror to rbd storage : no sparse rbd image List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Ceph Devel , qemu-devel >>Lack of bdrv_co_write_zeroes is why detect-zeroes does not work. >> >>Lack of bdrv_get_block_status is why sparse->sparse does not work >>without detect-zeroes. Ok, thanks Paolo ! Both are missing in rbd block driver. @ceph-devel . Could it be possible to= implement them ? Also, about drive-mirror, I had tried with detect-zeroes with simple qcow2 = file, and It don't seem to help. I'm not sure that detect-zeroes is implement in drive-mirror. also, the target mirrored volume don't seem to have the detect-zeroes optio= n # info block drive-virtio1: /source.qcow2 (qcow2) Detect zeroes: on #du -sh source.qcow2 : 2M drive-mirror source.qcow2 -> target.qcow2 # info block drive-virtio1: /target.qcow2 (qcow2) #du -sh target.qcow2 : 11G ----- Mail original ----- De: "Paolo Bonzini" =C3=80: "Alexandre DERUMIER" , "qemu-devel" Cc: "Ceph Devel" Envoy=C3=A9: Dimanche 12 Octobre 2014 15:02:12 Objet: Re: qemu drive-mirror to rbd storage : no sparse rbd image Il 08/10/2014 13:15, Alexandre DERUMIER ha scritto: > Hi, > > I'm currently planning to migrate our storage to ceph/rbd through qemu dr= ive-mirror > > and It seem that drive-mirror with rbd block driver, don't create a spars= e image. (all zeros are copied to the target rbd). > > Also note, that it's working fine with "qemu-img convert" , the rbd volum= e is sparse after conversion. > > > Could it be related to the "bdrv_co_write_zeroes" missing features in blo= ck/rbd.c ? > > (It's available in other block drivers (scsi,gluster,raw-aio) , and I don= 't have this problem with theses block drivers). Lack of bdrv_co_write_zeroes is why detect-zeroes does not work. Lack of bdrv_get_block_status is why sparse->sparse does not work without detect-zeroes. Paolo