* Any API to get metadata?
@ 2012-12-26 13:46 lollipop
2012-12-26 16:46 ` Sage Weil
0 siblings, 1 reply; 2+ messages in thread
From: lollipop @ 2012-12-26 13:46 UTC (permalink / raw)
To: ceph-devel
hello,there.
I am wondering if there is any API to get the metadata of a file .
I have the ceph file system run by mounting it to the /mnt/ceph
I want to know how many chunks the file has been parted,and where the chunks
have been stored.
Is there any API I can use to get the information?
Thank you very much!
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Any API to get metadata?
2012-12-26 13:46 Any API to get metadata? lollipop
@ 2012-12-26 16:46 ` Sage Weil
0 siblings, 0 replies; 2+ messages in thread
From: Sage Weil @ 2012-12-26 16:46 UTC (permalink / raw)
To: lollipop; +Cc: ceph-devel
On Wed, 26 Dec 2012, lollipop wrote:
> hello,there.
> I am wondering if there is any API to get the metadata of a file .
> I have the ceph file system run by mounting it to the /mnt/ceph
> I want to know how many chunks the file has been parted,and where the chunks
> have been stored.
> Is there any API I can use to get the information?
> Thank you very much!
This is available via an ioctl on the mounted file system (see
linux.git/include/linux/ceph/ioctl.h) or via libcephfs
(see ceph.git/src/include/cephfs/libcephfs.h):
/* expose file layout */
int ceph_get_file_stripe_unit(struct ceph_mount_info *cmount, int fh);
int ceph_get_file_pool(struct ceph_mount_info *cmount, int fh);
int ceph_get_file_replication(struct ceph_mount_info *cmount, int fh);
int ceph_get_file_stripe_address(struct ceph_mount_info *cmount, int fd, loff_t offset,
struct sockaddr_storage *addr, int naddr);
sage
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-12-26 16:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-26 13:46 Any API to get metadata? lollipop
2012-12-26 16:46 ` Sage Weil
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.