aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/ioctl.h
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2009-10-06 14:31:14 -0400
committerSage Weil <sage@newdream.net>2009-10-06 14:31:14 -0400
commit8f4e91dee2a245e4be6942f4a8d83a769e13a47d (patch)
tree6bbb4ea1a42186a0d371dd5c1a1fd03e55f39dbf /fs/ceph/ioctl.h
parenta8e63b7d51cce4557ee7bcd8f51be5cae8547d20 (diff)
ceph: ioctls
A few Ceph ioctls for getting and setting file layout (striping) parameters, and learning the identity and network address of the OSD a given region of a file is stored on. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/ioctl.h')
-rw-r--r--fs/ceph/ioctl.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/fs/ceph/ioctl.h b/fs/ceph/ioctl.h
new file mode 100644
index 000000000000..3c511dab3730
--- /dev/null
+++ b/fs/ceph/ioctl.h
@@ -0,0 +1,39 @@
1#ifndef FS_CEPH_IOCTL_H
2#define FS_CEPH_IOCTL_H
3
4#include <linux/ioctl.h>
5#include <linux/types.h>
6
7#define CEPH_IOCTL_MAGIC 0x97
8
9/* just use u64 to align sanely on all archs */
10struct ceph_ioctl_layout {
11 __u64 stripe_unit, stripe_count, object_size;
12 __u64 data_pool;
13};
14
15#define CEPH_IOC_GET_LAYOUT _IOR(CEPH_IOCTL_MAGIC, 1, \
16 struct ceph_ioctl_layout)
17#define CEPH_IOC_SET_LAYOUT _IOW(CEPH_IOCTL_MAGIC, 2, \
18 struct ceph_ioctl_layout)
19
20/*
21 * Extract identity, address of the OSD and object storing a given
22 * file offset.
23 */
24struct ceph_ioctl_dataloc {
25 __u64 file_offset; /* in+out: file offset */
26 __u64 object_offset; /* out: offset in object */
27 __u64 object_no; /* out: object # */
28 __u64 object_size; /* out: object size */
29 char object_name[64]; /* out: object name */
30 __u64 block_offset; /* out: offset in block */
31 __u64 block_size; /* out: block length */
32 __s64 osd; /* out: osd # */
33 struct sockaddr_storage osd_addr; /* out: osd address */
34};
35
36#define CEPH_IOC_GET_DATALOC _IOWR(CEPH_IOCTL_MAGIC, 3, \
37 struct ceph_ioctl_dataloc)
38
39#endif