Re: Which API can map one object to the osd?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I don't think we expose this as an API as such.  If you wanted to do
it from within the ceph source you'd use OSDMap::object_locator_to_pg
and OSDMap::pg_to_acting_osds (see how Client::get_file_extent_osds
does it).

We do expose a special case of this in the libcephfs API
(ceph_get_file_extent_osds), where one can query the OSDs for a file
extent (but not arbitrary object names).  I guess that is kind of a
precedent for adding it to librados, although it does kind of break
the abstraction a bit.

John

On Tue, Dec 2, 2014 at 5:54 AM, 申凌轩 <a45154630@xxxxxxx> wrote:
> Hi everyone,
> In my application I need to know which osd contain the object.
> And I know how to get that information through shell command: ceph osd map
> [objectname] -p [poolname]
> But I CAN'T find the exactly API (C, C ++) to do this job.
> Does anyone have an idea ?
>
> Many THX
>
>
>
> _______________________________________________
> ceph-users mailing list
> ceph-users@xxxxxxxxxxxxxx
> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
>
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com





[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux