On Tue, Dec 23, 2014 at 11:22:52PM +0100, Loic Dachary wrote: > Hi Andreas, > > I took a closer look at https://github.com/ceph/ceph/pull/2730 > implementing rados whereis [--dns] and I think it deserves a > discussion here. If I understand correctly, it relies on a new > function of the rados API: > > typedef struct whereis { > int64_t osd_id; //< ID of the OSD hosting this object > std::string osd_state; //< state of the OSD - either 'active' or 'inactive' Wouldn't it be better to use enum instead of string for state? > int64_t pg_seed; //< Seed of the PG hosting this object > std::string ip_string; //< Ip as string > std::vector<std::string> host_names; //< optional reverse DNS HostNames > std::map<std::string, std::string> user_map; //< optional user KV map > void resolve(); //< reverse DNS OSD IPs and store in HostNames > } whereis_t; > > static int whereis(IoCtx &ioctx, const std::string &oid, std::vector<whereis_t> &locations); -- Mykola Golub -- 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