diff options
Diffstat (limited to 'fs/ceph/ioctl.h')
| -rw-r--r-- | fs/ceph/ioctl.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/fs/ceph/ioctl.h b/fs/ceph/ioctl.h new file mode 100644 index 000000000000..25e4f1a9d059 --- /dev/null +++ b/fs/ceph/ioctl.h | |||
| @@ -0,0 +1,40 @@ | |||
| 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 */ | ||
| 10 | struct ceph_ioctl_layout { | ||
| 11 | __u64 stripe_unit, stripe_count, object_size; | ||
| 12 | __u64 data_pool; | ||
| 13 | __s64 preferred_osd; | ||
| 14 | }; | ||
| 15 | |||
| 16 | #define CEPH_IOC_GET_LAYOUT _IOR(CEPH_IOCTL_MAGIC, 1, \ | ||
| 17 | struct ceph_ioctl_layout) | ||
| 18 | #define CEPH_IOC_SET_LAYOUT _IOW(CEPH_IOCTL_MAGIC, 2, \ | ||
| 19 | struct ceph_ioctl_layout) | ||
| 20 | |||
| 21 | /* | ||
| 22 | * Extract identity, address of the OSD and object storing a given | ||
| 23 | * file offset. | ||
| 24 | */ | ||
| 25 | struct ceph_ioctl_dataloc { | ||
| 26 | __u64 file_offset; /* in+out: file offset */ | ||
| 27 | __u64 object_offset; /* out: offset in object */ | ||
| 28 | __u64 object_no; /* out: object # */ | ||
| 29 | __u64 object_size; /* out: object size */ | ||
| 30 | char object_name[64]; /* out: object name */ | ||
| 31 | __u64 block_offset; /* out: offset in block */ | ||
| 32 | __u64 block_size; /* out: block length */ | ||
| 33 | __s64 osd; /* out: osd # */ | ||
| 34 | struct sockaddr_storage osd_addr; /* out: osd address */ | ||
| 35 | }; | ||
| 36 | |||
| 37 | #define CEPH_IOC_GET_DATALOC _IOWR(CEPH_IOCTL_MAGIC, 3, \ | ||
| 38 | struct ceph_ioctl_dataloc) | ||
| 39 | |||
| 40 | #endif | ||
