qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] where can i customize rbd object size?
@ 2015-08-19  7:39 Jaze Lee
  2015-09-03 16:48 ` Stefan Hajnoczi
  0 siblings, 1 reply; 3+ messages in thread
From: Jaze Lee @ 2015-08-19  7:39 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 843 bytes --]

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
<https://lxr.missinglinkelectronics.com/qemu+v2.1.0/+code=OBJ_MAX_SIZE>
(1UL << OBJ_DEFAULT_OBJ_ORDER
<https://lxr.missinglinkelectronics.com/qemu+v2.1.0/+code=OBJ_DEFAULT_OBJ_ORDER>
)

    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
<https://lxr.missinglinkelectronics.com/qemu+v2.1.0/+code=OBJ_DEFAULT_OBJ_ORDER>,
if someone knows , please tell me. Thanks a lot.

-- 
谦谦君子

[-- Attachment #2: Type: text/html, Size: 1308 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] where can i customize rbd object size?
  2015-08-19  7:39 [Qemu-devel] where can i customize rbd object size? Jaze Lee
@ 2015-09-03 16:48 ` Stefan Hajnoczi
  2015-09-08 21:02   ` Josh Durgin
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Hajnoczi @ 2015-09-03 16:48 UTC (permalink / raw)
  To: Jaze Lee; +Cc: Josh Durgin, qemu-devel

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
> <https://lxr.missinglinkelectronics.com/qemu+v2.1.0/+code=OBJ_MAX_SIZE>
> (1UL << OBJ_DEFAULT_OBJ_ORDER
> <https://lxr.missinglinkelectronics.com/qemu+v2.1.0/+code=OBJ_DEFAULT_OBJ_ORDER>
> )
> 
>     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
> <https://lxr.missinglinkelectronics.com/qemu+v2.1.0/+code=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 <jdurgin@redhat.com> (supporter:RBD)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] where can i customize rbd object size?
  2015-09-03 16:48 ` Stefan Hajnoczi
@ 2015-09-08 21:02   ` Josh Durgin
  0 siblings, 0 replies; 3+ messages in thread
From: Josh Durgin @ 2015-09-08 21:02 UTC (permalink / raw)
  To: Stefan Hajnoczi, Jaze Lee; +Cc: qemu-devel

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
>> <https://lxr.missinglinkelectronics.com/qemu+v2.1.0/+code=OBJ_MAX_SIZE>
>> (1UL << OBJ_DEFAULT_OBJ_ORDER
>> <https://lxr.missinglinkelectronics.com/qemu+v2.1.0/+code=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
>> <https://lxr.missinglinkelectronics.com/qemu+v2.1.0/+code=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 <jdurgin@redhat.com> (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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-09-08 21:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-19  7:39 [Qemu-devel] where can i customize rbd object size? Jaze Lee
2015-09-03 16:48 ` Stefan Hajnoczi
2015-09-08 21:02   ` Josh Durgin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).