From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43084) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZQAM-0001Dw-9N for qemu-devel@nongnu.org; Tue, 08 Sep 2015 17:10:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZQAI-00075R-A2 for qemu-devel@nongnu.org; Tue, 08 Sep 2015 17:10:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44479) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZQAI-000758-5U for qemu-devel@nongnu.org; Tue, 08 Sep 2015 17:10:54 -0400 Message-ID: <55EF4CCD.4000600@redhat.com> Date: Tue, 08 Sep 2015 14:02:05 -0700 From: Josh Durgin MIME-Version: 1.0 References: <20150903164858.GE18405@stefanha-thinkpad.redhat.com> In-Reply-To: <20150903164858.GE18405@stefanha-thinkpad.redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] where can i customize rbd object size? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , Jaze Lee Cc: qemu-devel@nongnu.org On 09/03/2015 09:48 AM, Stefan Hajnoczi wrote: > On Wed, Aug 19, 2015 at 03:39:20PM +0800, Jaze Lee wrote: >> Hello, >> >> qemu-img convert -f qcow2 Trove---mysql-5.6---2015-07-16.qcow2 -O raw >> rbd:openstack-00/8205d01a-874c-44c0-b114-1c03821fcc24:conf=/etc/ceph/ceph.conf >> >> How can i specify the object size that rbd uses? I found that the >> qemu-image can only use the default object size. It is defined in >> block/rbd.c >> >> #define OBJ_MAX_SIZE >> >> (1UL << OBJ_DEFAULT_OBJ_ORDER >> >> ) Those are remnants from before librbd existed, they aren't used in qemu anymore. >> If someone know how to specify the object size, please tell me. thanks >> a lot. >> By the way i do not find the define for OBJ_DEFAULT_OBJ_ORDER >> , >> if someone knows , please tell me. Thanks a lot. > > I have CCed the rbd.c maintainer for you: > $ scripts/get_maintainer.pl -f block/rbd.c > Josh Durgin (supporter:RBD) > Thanks for CCing me, I missed it before. You can specify the rbd object size in bytes via the cluster_size option, e.g. qemu-img convert -f qcow2 Trove---mysql-5.6---2015-07-16.qcow2 -O raw -o cluster_size=8388608 rbd:openstack-00/8205d01a-874c-44c0-b114-1c03821fcc24:conf=/etc/ceph/ceph.conf The code handling this is here: https://lxr.missinglinkelectronics.com/#qemu+v2.1.0/block/rbd.c#L318 Josh