On Thu, May 7, 2015 at 6:29 PM, Zhou, Yuan <yuan.zhou@xxxxxxxxx> wrote: > Ceph use crush algorithm to provide the mapping of objects to OSD servers. This is great for clients so they could talk to with these OSDs directly. However there are some scenarios where the application needs to access the crush map, for load-balancing as an example. > > Currently Ceph doesn't provides any API to render the layout. If your application needs to access the crush map you'll going to rely on the command 'ceph osd map pool_name obj_name'. With this libcrush.so we could let the application to choose which nodes to access. The other advantage is we could provide some other bindings(python, go) based on this also. > > From the git log we find libcrush was there before but removed out since Argonaut. Can anyone kindly share us the background of this change? I don't think there was ever a libcrush that was friendly for external use. There was a makefile-level "libcrush" but it got merged into libcommon, presumably for ease of maintenance. The interfaces we use around CRUSH are just not very clean, IIRC; the C interface is opaque and the C++ CrushWrapper bits are...well, C++, and not easy to change into something separable from the OSDMap, either. :/ That said, if somebody wanted to rework the code interfaces to be nicer, PRs are always welcome. ;) -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html