On Thursday, March 14, 2013 at 11:14 AM, Noah Watkins wrote: > The current CephFS API is used to extract locality information as follows: > > First we get a list of OSD IDs: > > ceph_get_file_extent_osds(offset) -> [OSD ID]* > > Using the OSD IDs we can then query for the CRUSH bucket hierarchy: > > ceph_get_osd_crush_location(osd_id) -> path > > The path includes hostname information, but we'd still like to get the IP. The current API for doing this is: > > ceph_get_file_stripe_address(offset) -> [sockaddr]* > > that returns an IP for each OSD holds replicas. The order of the output list should be the same as the the OSD list, but It'd be nice to have a consistent API that deals with OSD id, making the correspondence explicit. Agreed. We should probably deprecate the get_file_stripe_address() and make them turn IDs into addresses on their own. > For instance: > > ceph_get_file_stripe_address(osd_id) -> sockaddr How about ceph_get_osd_address(osd_id) -> sockaddr ;) > Another option is to have `ceph_get_osd_crush_location` return both the path and a sockaddr. No way — that's conflating two different things rather more than we should be. For one thing the sockaddr can change during a daemon restart but the crush location won't. -Greg -- 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