]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/cephfs/c_cephfs.pxd
import ceph pacific 16.2.5
[ceph.git] / ceph / src / pybind / cephfs / c_cephfs.pxd
1 from libc.stdint cimport *
2 from types cimport *
3
4 cdef extern from "cephfs/ceph_ll_client.h":
5 cdef struct statx "ceph_statx":
6 uint32_t stx_mask
7 uint32_t stx_blksize
8 uint32_t stx_nlink
9 uint32_t stx_uid
10 uint32_t stx_gid
11 uint16_t stx_mode
12 uint64_t stx_ino
13 uint64_t stx_size
14 uint64_t stx_blocks
15 uint64_t stx_dev
16 uint64_t stx_rdev
17 timespec stx_atime
18 timespec stx_ctime
19 timespec stx_mtime
20 timespec stx_btime
21 uint64_t stx_version
22
23 cdef extern from "cephfs/libcephfs.h" nogil:
24 cdef struct ceph_mount_info:
25 pass
26
27 cdef struct ceph_dir_result:
28 pass
29
30 cdef struct snap_metadata:
31 const char *key
32 const char *value
33
34 cdef struct snap_info:
35 uint64_t id
36 size_t nr_snap_metadata
37 snap_metadata *snap_metadata
38
39 ctypedef void* rados_t
40
41 const char *ceph_version(int *major, int *minor, int *patch)
42
43 int ceph_create(ceph_mount_info **cmount, const char * const id)
44 int ceph_create_from_rados(ceph_mount_info **cmount, rados_t cluster)
45 int ceph_init(ceph_mount_info *cmount)
46 void ceph_shutdown(ceph_mount_info *cmount)
47
48 int ceph_getaddrs(ceph_mount_info* cmount, char** addrs)
49 int64_t ceph_get_fs_cid(ceph_mount_info *cmount)
50 int ceph_conf_read_file(ceph_mount_info *cmount, const char *path_list)
51 int ceph_conf_parse_argv(ceph_mount_info *cmount, int argc, const char **argv)
52 int ceph_conf_get(ceph_mount_info *cmount, const char *option, char *buf, size_t len)
53 int ceph_conf_set(ceph_mount_info *cmount, const char *option, const char *value)
54 int ceph_set_mount_timeout(ceph_mount_info *cmount, uint32_t timeout)
55
56 int ceph_mount(ceph_mount_info *cmount, const char *root)
57 int ceph_select_filesystem(ceph_mount_info *cmount, const char *fs_name)
58 int ceph_unmount(ceph_mount_info *cmount)
59 int ceph_abort_conn(ceph_mount_info *cmount)
60 uint64_t ceph_get_instance_id(ceph_mount_info *cmount)
61 int ceph_fstatx(ceph_mount_info *cmount, int fd, statx *stx, unsigned want, unsigned flags)
62 int ceph_statx(ceph_mount_info *cmount, const char *path, statx *stx, unsigned want, unsigned flags)
63 int ceph_statfs(ceph_mount_info *cmount, const char *path, statvfs *stbuf)
64
65 int ceph_setattrx(ceph_mount_info *cmount, const char *relpath, statx *stx, int mask, int flags)
66 int ceph_fsetattrx(ceph_mount_info *cmount, int fd, statx *stx, int mask)
67 int ceph_mds_command(ceph_mount_info *cmount, const char *mds_spec, const char **cmd, size_t cmdlen,
68 const char *inbuf, size_t inbuflen, char **outbuf, size_t *outbuflen,
69 char **outs, size_t *outslen)
70 int ceph_rename(ceph_mount_info *cmount, const char *from_, const char *to)
71 int ceph_link(ceph_mount_info *cmount, const char *existing, const char *newname)
72 int ceph_unlink(ceph_mount_info *cmount, const char *path)
73 int ceph_symlink(ceph_mount_info *cmount, const char *existing, const char *newname)
74 int ceph_readlink(ceph_mount_info *cmount, const char *path, char *buf, int64_t size)
75 int ceph_setxattr(ceph_mount_info *cmount, const char *path, const char *name,
76 const void *value, size_t size, int flags)
77 int ceph_fsetxattr(ceph_mount_info *cmount, int fd, const char *name,
78 const void *value, size_t size, int flags)
79 int ceph_lsetxattr(ceph_mount_info *cmount, const char *path, const char *name,
80 const void *value, size_t size, int flags)
81 int ceph_getxattr(ceph_mount_info *cmount, const char *path, const char *name,
82 void *value, size_t size)
83 int ceph_fgetxattr(ceph_mount_info *cmount, int fd, const char *name,
84 void *value, size_t size)
85 int ceph_lgetxattr(ceph_mount_info *cmount, const char *path, const char *name,
86 void *value, size_t size)
87 int ceph_removexattr(ceph_mount_info *cmount, const char *path, const char *name)
88 int ceph_fremovexattr(ceph_mount_info *cmount, int fd, const char *name)
89 int ceph_lremovexattr(ceph_mount_info *cmount, const char *path, const char *name)
90 int ceph_listxattr(ceph_mount_info *cmount, const char *path, char *list, size_t size)
91 int ceph_flistxattr(ceph_mount_info *cmount, int fd, char *list, size_t size)
92 int ceph_llistxattr(ceph_mount_info *cmount, const char *path, char *list, size_t size)
93 int ceph_write(ceph_mount_info *cmount, int fd, const char *buf, int64_t size, int64_t offset)
94 int ceph_pwritev(ceph_mount_info *cmount, int fd, iovec *iov, int iovcnt, int64_t offset)
95 int ceph_read(ceph_mount_info *cmount, int fd, char *buf, int64_t size, int64_t offset)
96 int ceph_preadv(ceph_mount_info *cmount, int fd, iovec *iov, int iovcnt, int64_t offset)
97 int ceph_flock(ceph_mount_info *cmount, int fd, int operation, uint64_t owner)
98 int ceph_mknod(ceph_mount_info *cmount, const char *path, mode_t mode, dev_t rdev)
99 int ceph_close(ceph_mount_info *cmount, int fd)
100 int ceph_open(ceph_mount_info *cmount, const char *path, int flags, mode_t mode)
101 int ceph_mkdir(ceph_mount_info *cmount, const char *path, mode_t mode)
102 int ceph_mksnap(ceph_mount_info *cmount, const char *path, const char *name, mode_t mode, snap_metadata *snap_metadata, size_t nr_snap_metadata)
103 int ceph_rmsnap(ceph_mount_info *cmount, const char *path, const char *name)
104 int ceph_get_snap_info(ceph_mount_info *cmount, const char *path, snap_info *snap_info)
105 void ceph_free_snap_info_buffer(snap_info *snap_info)
106 int ceph_mkdirs(ceph_mount_info *cmount, const char *path, mode_t mode)
107 int ceph_closedir(ceph_mount_info *cmount, ceph_dir_result *dirp)
108 int ceph_opendir(ceph_mount_info *cmount, const char *name, ceph_dir_result **dirpp)
109 void ceph_rewinddir(ceph_mount_info *cmount, ceph_dir_result *dirp)
110 int64_t ceph_telldir(ceph_mount_info *cmount, ceph_dir_result *dirp)
111 void ceph_seekdir(ceph_mount_info *cmount, ceph_dir_result *dirp, int64_t offset)
112 int ceph_chdir(ceph_mount_info *cmount, const char *path)
113 dirent * ceph_readdir(ceph_mount_info *cmount, ceph_dir_result *dirp)
114 int ceph_rmdir(ceph_mount_info *cmount, const char *path)
115 const char* ceph_getcwd(ceph_mount_info *cmount)
116 int ceph_sync_fs(ceph_mount_info *cmount)
117 int ceph_fsync(ceph_mount_info *cmount, int fd, int syncdataonly)
118 int ceph_lazyio(ceph_mount_info *cmount, int fd, int enable)
119 int ceph_lazyio_propagate(ceph_mount_info *cmount, int fd, int64_t offset, size_t count)
120 int ceph_lazyio_synchronize(ceph_mount_info *cmount, int fd, int64_t offset, size_t count)
121 int ceph_fallocate(ceph_mount_info *cmount, int fd, int mode, int64_t offset, int64_t length)
122 int ceph_chmod(ceph_mount_info *cmount, const char *path, mode_t mode)
123 int ceph_lchmod(ceph_mount_info *cmount, const char *path, mode_t mode)
124 int ceph_fchmod(ceph_mount_info *cmount, int fd, mode_t mode)
125 int ceph_chown(ceph_mount_info *cmount, const char *path, int uid, int gid)
126 int ceph_lchown(ceph_mount_info *cmount, const char *path, int uid, int gid)
127 int ceph_fchown(ceph_mount_info *cmount, int fd, int uid, int gid)
128 int64_t ceph_lseek(ceph_mount_info *cmount, int fd, int64_t offset, int whence)
129 void ceph_buffer_free(char *buf)
130 mode_t ceph_umask(ceph_mount_info *cmount, mode_t mode)
131 int ceph_utime(ceph_mount_info *cmount, const char *path, utimbuf *buf)
132 int ceph_futime(ceph_mount_info *cmount, int fd, utimbuf *buf)
133 int ceph_utimes(ceph_mount_info *cmount, const char *path, timeval times[2])
134 int ceph_lutimes(ceph_mount_info *cmount, const char *path, timeval times[2])
135 int ceph_futimes(ceph_mount_info *cmount, int fd, timeval times[2])
136 int ceph_futimens(ceph_mount_info *cmount, int fd, timespec times[2])
137 int ceph_get_file_replication(ceph_mount_info *cmount, int fh)
138 int ceph_get_path_replication(ceph_mount_info *cmount, const char *path)
139 int ceph_get_pool_id(ceph_mount_info *cmount, const char *pool_name)
140 int ceph_get_pool_replication(ceph_mount_info *cmount, int pool_id)
141 int ceph_debug_get_fd_caps(ceph_mount_info *cmount, int fd)
142 int ceph_debug_get_file_caps(ceph_mount_info *cmount, const char *path)
143 uint32_t ceph_get_cap_return_timeout(ceph_mount_info *cmount)
144 void ceph_set_uuid(ceph_mount_info *cmount, const char *uuid)
145 void ceph_set_session_timeout(ceph_mount_info *cmount, unsigned timeout)
146 int ceph_get_file_layout(ceph_mount_info *cmount, int fh, int *stripe_unit, int *stripe_count, int *object_size, int *pg_pool)
147 int ceph_get_file_pool_name(ceph_mount_info *cmount, int fh, char *buf, size_t buflen)
148 int ceph_get_default_data_pool_name(ceph_mount_info *cmount, char *buf, size_t buflen)