From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57935) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XdInD-0006Zz-WC for qemu-devel@nongnu.org; Sun, 12 Oct 2014 09:02:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XdIn4-0000vq-W0 for qemu-devel@nongnu.org; Sun, 12 Oct 2014 09:02:35 -0400 Received: from mail-wi0-x22d.google.com ([2a00:1450:400c:c05::22d]:62003) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XdIn4-0000vb-Nz for qemu-devel@nongnu.org; Sun, 12 Oct 2014 09:02:26 -0400 Received: by mail-wi0-f173.google.com with SMTP id fb4so5415543wid.12 for ; Sun, 12 Oct 2014 06:02:25 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <543A7BD4.4030601@redhat.com> Date: Sun, 12 Oct 2014 15:02:12 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <54c55fc6-b12a-42e5-b99d-9752c8a9b19b@mailpro> <749ee402-bce4-45cb-97f2-8946542437fc@mailpro> In-Reply-To: <749ee402-bce4-45cb-97f2-8946542437fc@mailpro> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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: Alexandre DERUMIER , qemu-devel Cc: Ceph Devel Il 08/10/2014 13:15, Alexandre DERUMIER ha scritto: > Hi, > > I'm currently planning to migrate our storage to ceph/rbd through qemu drive-mirror > > and It seem that drive-mirror with rbd block driver, don't create a sparse image. (all zeros are copied to the target rbd). > > Also note, that it's working fine with "qemu-img convert" , the rbd volume is sparse after conversion. > > > Could it be related to the "bdrv_co_write_zeroes" missing features in block/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