On Wed, 20 Feb 2013, Noah Watkins wrote: > > On Feb 19, 2013, at 4:39 PM, Sage Weil <sage@xxxxxxxxxxx> wrote: > > > However, we do have host and rack information in the crush map, at least > > for non-customized installations. How about something like > > > > string ceph_get_osd_crush_location(int osd, string type); > > > > or similar. We could call that with "host" and "rack" and get exactly > > what we need, without making any changes to the data structures. > > This would then be used in conjunction with an interface: > > ceph_offset_to_osds(offset, vector<int>& osds) > ... > osdmpa->pg_to_acting_osds(osds) > ... > > or something like this that replaces the current extent-to-sockaddr > interface? The proposed interface about would do the host/ip mapping, as > well as the topology mapping? Yeah. The ceph_offset_to_osds should probably also have an (optional?) out argument that tells you how long the extent is starting from offset that is on those devices. Then you can do another call at offset+len to get the next segment. sage -- 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