On Fri, 26 Mar 2010, Yehuda Sadeh Weinraub wrote:
> On Sun, Mar 14, 2010 at 9:14 AM, Christian Brunner <[email protected]> wrote:
> >
> > Attached is an updated version of my rados kvm driver. I did the following
> > changes:
> >
>
> We tested it and it looks great. We were working on a native linux
> rados block device, and it'll be great if it would be compatible with
> the kvm one. There were some fairly minor issues that were related to
> the header. This is the modified metadata header that we're currently
> using:
>
> struct rbd_obj_header_ondisk {
> char text[64];
> char signature[4];
> char version[8];
> __le64 image_size;
> char obj_order;
Maybe
unsigned char obj_order;
> unsigned char crypt_type;
> unsigned char comp_type;
or __u8 for all of these?
> __le16 snap_count;
> __le32 snap_id[0];
Make this:
__le64 snap_seq;
__le16 snap_count;
__le64 snap_id[0];
> } __attribute__((packed));
Otherwise, looks good to me!
sage
>
>
> Note that I changed objsize to obj_order, so that it'd be clear that
> the object size is a power of 2. Also, each of the fields should have
> be endian aware. We prefer using little-endian data, just so that it
> would be consistent across the ceph system.
> Another issue is that the structure should be packed, so that it
> doesn't have any alignment problems.
> The original structure specified an array of MAX_SNAPS snap_id, where
> MAX_SNAPS is currently 4096. I'd rather have it set later on
> dynamically, as this is huge and quite a waste.
>
> The following was also changed:
>
> #define RBD_SUFFIX ".rbd"
>
> #define RBD_MAX_OBJ_NAME_SIZE 96
> #define RBD_MAX_SEG_NAME_SIZE 128
>
> I'd rather that the RBD_SUFFIX be a bit more meaningful. The object
> name size was reduced to 96 so that we don't overflow when adding the
> segment name.
>
> Thanks!
> Yehuda
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Ceph-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ceph-devel
>
>
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ceph-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ceph-devel