]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/cephfs/mock_cephfs.pxi
update ceph source to reef 18.2.1
[ceph.git] / ceph / src / pybind / cephfs / mock_cephfs.pxi
1 # cython: embedsignature=True
2
3 from libc.stdint cimport *
4 from types cimport timespec
5
6
7 cdef:
8 cdef struct statx "ceph_statx":
9 uint32_t stx_mask
10 uint32_t stx_blksize
11 uint32_t stx_nlink
12 uint32_t stx_uid
13 uint32_t stx_gid
14 uint16_t stx_mode
15 uint64_t stx_ino
16 uint64_t stx_size
17 uint64_t stx_blocks
18 uint64_t stx_dev
19 uint64_t stx_rdev
20 timespec stx_atime
21 timespec stx_ctime
22 timespec stx_mtime
23 timespec stx_btime
24 uint64_t stx_version
25
26 cdef nogil:
27 cdef struct ceph_mount_info:
28 int dummy
29
30 cdef struct ceph_dir_result:
31 int dummy
32
33 cdef struct snap_metadata:
34 const char *key
35 const char *value
36
37 cdef struct snap_info:
38 uint64_t id
39 size_t nr_snap_metadata
40 snap_metadata *snap_metadata
41
42 cdef struct ceph_snapdiff_info:
43 int dummy
44
45 cdef struct ceph_snapdiff_entry_t:
46 int dummy
47
48 ctypedef void* rados_t
49
50 const char *ceph_version(int *major, int *minor, int *patch):
51 pass
52
53 int ceph_create(ceph_mount_info **cmount, const char * const id):
54 pass
55 int ceph_create_from_rados(ceph_mount_info **cmount, rados_t cluster):
56 pass
57 int ceph_init(ceph_mount_info *cmount):
58 pass
59 void ceph_shutdown(ceph_mount_info *cmount):
60 pass
61
62 int ceph_getaddrs(ceph_mount_info* cmount, char** addrs):
63 pass
64 int64_t ceph_get_fs_cid(ceph_mount_info *cmount):
65 pass
66 int ceph_conf_read_file(ceph_mount_info *cmount, const char *path_list):
67 pass
68 int ceph_conf_parse_argv(ceph_mount_info *cmount, int argc, const char **argv):
69 pass
70 int ceph_conf_get(ceph_mount_info *cmount, const char *option, char *buf, size_t len):
71 pass
72 int ceph_conf_set(ceph_mount_info *cmount, const char *option, const char *value):
73 pass
74 int ceph_set_mount_timeout(ceph_mount_info *cmount, uint32_t timeout):
75 pass
76
77 int ceph_mount(ceph_mount_info *cmount, const char *root):
78 pass
79 int ceph_select_filesystem(ceph_mount_info *cmount, const char *fs_name):
80 pass
81 int ceph_unmount(ceph_mount_info *cmount):
82 pass
83 int ceph_abort_conn(ceph_mount_info *cmount):
84 pass
85 uint64_t ceph_get_instance_id(ceph_mount_info *cmount):
86 pass
87 int ceph_fstatx(ceph_mount_info *cmount, int fd, statx *stx, unsigned want, unsigned flags):
88 pass
89 int ceph_statx(ceph_mount_info *cmount, const char *path, statx *stx, unsigned want, unsigned flags):
90 pass
91 int ceph_statfs(ceph_mount_info *cmount, const char *path, statvfs *stbuf):
92 pass
93
94 int ceph_setattrx(ceph_mount_info *cmount, const char *relpath, statx *stx, int mask, int flags):
95 pass
96 int ceph_fsetattrx(ceph_mount_info *cmount, int fd, statx *stx, int mask):
97 pass
98 int ceph_mds_command(ceph_mount_info *cmount, const char *mds_spec, const char **cmd, size_t cmdlen,
99 const char *inbuf, size_t inbuflen, char **outbuf, size_t *outbuflen,
100 char **outs, size_t *outslen):
101 pass
102 int ceph_rename(ceph_mount_info *cmount, const char *from_, const char *to):
103 pass
104 int ceph_link(ceph_mount_info *cmount, const char *existing, const char *newname):
105 pass
106 int ceph_unlink(ceph_mount_info *cmount, const char *path):
107 pass
108 int ceph_symlink(ceph_mount_info *cmount, const char *existing, const char *newname):
109 pass
110 int ceph_readlink(ceph_mount_info *cmount, const char *path, char *buf, int64_t size):
111 pass
112 int ceph_setxattr(ceph_mount_info *cmount, const char *path, const char *name,
113 const void *value, size_t size, int flags):
114 pass
115 int ceph_fsetxattr(ceph_mount_info *cmount, int fd, const char *name,
116 const void *value, size_t size, int flags):
117 pass
118 int ceph_lsetxattr(ceph_mount_info *cmount, const char *path, const char *name,
119 const void *value, size_t size, int flags):
120 pass
121 int ceph_getxattr(ceph_mount_info *cmount, const char *path, const char *name,
122 void *value, size_t size):
123 pass
124 int ceph_fgetxattr(ceph_mount_info *cmount, int fd, const char *name,
125 void *value, size_t size):
126 pass
127 int ceph_lgetxattr(ceph_mount_info *cmount, const char *path, const char *name,
128 void *value, size_t size):
129 pass
130 int ceph_removexattr(ceph_mount_info *cmount, const char *path, const char *name):
131 pass
132 int ceph_fremovexattr(ceph_mount_info *cmount, int fd, const char *name):
133 pass
134 int ceph_lremovexattr(ceph_mount_info *cmount, const char *path, const char *name):
135 pass
136 int ceph_listxattr(ceph_mount_info *cmount, const char *path, char *list, size_t size):
137 pass
138 int ceph_flistxattr(ceph_mount_info *cmount, int fd, char *list, size_t size):
139 pass
140 int ceph_llistxattr(ceph_mount_info *cmount, const char *path, char *list, size_t size):
141 pass
142 int ceph_write(ceph_mount_info *cmount, int fd, const char *buf, int64_t size, int64_t offset):
143 pass
144 int ceph_pwritev(ceph_mount_info *cmount, int fd, iovec *iov, int iovcnt, int64_t offset):
145 pass
146 int ceph_read(ceph_mount_info *cmount, int fd, char *buf, int64_t size, int64_t offset):
147 pass
148 int ceph_preadv(ceph_mount_info *cmount, int fd, iovec *iov, int iovcnt, int64_t offset):
149 pass
150 int ceph_flock(ceph_mount_info *cmount, int fd, int operation, uint64_t owner):
151 pass
152 int ceph_mknod(ceph_mount_info *cmount, const char *path, mode_t mode, dev_t rdev):
153 pass
154 int ceph_close(ceph_mount_info *cmount, int fd):
155 pass
156 int ceph_open(ceph_mount_info *cmount, const char *path, int flags, mode_t mode):
157 pass
158 int ceph_mkdir(ceph_mount_info *cmount, const char *path, mode_t mode):
159 pass
160 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):
161 pass
162 int ceph_rmsnap(ceph_mount_info *cmount, const char *path, const char *name):
163 pass
164 int ceph_get_snap_info(ceph_mount_info *cmount, const char *path, snap_info *snap_info):
165 pass
166 void ceph_free_snap_info_buffer(snap_info *snap_info):
167 pass
168 int ceph_mkdirs(ceph_mount_info *cmount, const char *path, mode_t mode):
169 pass
170 int ceph_closedir(ceph_mount_info *cmount, ceph_dir_result *dirp):
171 pass
172 int ceph_opendir(ceph_mount_info *cmount, const char *name, ceph_dir_result **dirpp):
173 pass
174 void ceph_rewinddir(ceph_mount_info *cmount, ceph_dir_result *dirp):
175 pass
176 int64_t ceph_telldir(ceph_mount_info *cmount, ceph_dir_result *dirp):
177 pass
178 void ceph_seekdir(ceph_mount_info *cmount, ceph_dir_result *dirp, int64_t offset):
179 pass
180 int ceph_chdir(ceph_mount_info *cmount, const char *path):
181 pass
182 dirent * ceph_readdir(ceph_mount_info *cmount, ceph_dir_result *dirp):
183 pass
184 int ceph_open_snapdiff(ceph_mount_info *cmount, const char *root_path, const char *rel_path, const char *snap1path, const char *snap2root, ceph_snapdiff_info *out):
185 pass
186 int ceph_readdir_snapdiff(ceph_snapdiff_info *snapdiff, ceph_snapdiff_entry_t *out):
187 pass
188 int ceph_close_snapdiff(ceph_snapdiff_info *snapdiff):
189 pass
190 int ceph_rmdir(ceph_mount_info *cmount, const char *path):
191 pass
192 const char* ceph_getcwd(ceph_mount_info *cmount):
193 pass
194 int ceph_sync_fs(ceph_mount_info *cmount):
195 pass
196 int ceph_fsync(ceph_mount_info *cmount, int fd, int syncdataonly):
197 pass
198 int ceph_lazyio(ceph_mount_info *cmount, int fd, int enable):
199 pass
200 int ceph_lazyio_propagate(ceph_mount_info *cmount, int fd, int64_t offset, size_t count):
201 pass
202 int ceph_lazyio_synchronize(ceph_mount_info *cmount, int fd, int64_t offset, size_t count):
203 pass
204 int ceph_fallocate(ceph_mount_info *cmount, int fd, int mode, int64_t offset, int64_t length):
205 pass
206 int ceph_chmod(ceph_mount_info *cmount, const char *path, mode_t mode):
207 pass
208 int ceph_lchmod(ceph_mount_info *cmount, const char *path, mode_t mode):
209 pass
210 int ceph_fchmod(ceph_mount_info *cmount, int fd, mode_t mode):
211 pass
212 int ceph_chown(ceph_mount_info *cmount, const char *path, int uid, int gid):
213 pass
214 int ceph_lchown(ceph_mount_info *cmount, const char *path, int uid, int gid):
215 pass
216 int ceph_fchown(ceph_mount_info *cmount, int fd, int uid, int gid):
217 pass
218 int64_t ceph_lseek(ceph_mount_info *cmount, int fd, int64_t offset, int whence):
219 pass
220 void ceph_buffer_free(char *buf):
221 pass
222 mode_t ceph_umask(ceph_mount_info *cmount, mode_t mode):
223 pass
224 int ceph_utime(ceph_mount_info *cmount, const char *path, utimbuf *buf):
225 pass
226 int ceph_futime(ceph_mount_info *cmount, int fd, utimbuf *buf):
227 pass
228 int ceph_utimes(ceph_mount_info *cmount, const char *path, timeval times[2]):
229 pass
230 int ceph_lutimes(ceph_mount_info *cmount, const char *path, timeval times[2]):
231 pass
232 int ceph_futimes(ceph_mount_info *cmount, int fd, timeval times[2]):
233 pass
234 int ceph_futimens(ceph_mount_info *cmount, int fd, timespec times[2]):
235 pass
236 int ceph_get_file_replication(ceph_mount_info *cmount, int fh):
237 pass
238 int ceph_get_path_replication(ceph_mount_info *cmount, const char *path):
239 pass
240 int ceph_get_pool_id(ceph_mount_info *cmount, const char *pool_name):
241 pass
242 int ceph_get_pool_replication(ceph_mount_info *cmount, int pool_id):
243 pass
244 int ceph_debug_get_fd_caps(ceph_mount_info *cmount, int fd):
245 pass
246 int ceph_debug_get_file_caps(ceph_mount_info *cmount, const char *path):
247 pass
248 uint32_t ceph_get_cap_return_timeout(ceph_mount_info *cmount):
249 pass
250 void ceph_set_uuid(ceph_mount_info *cmount, const char *uuid):
251 pass
252 void ceph_set_session_timeout(ceph_mount_info *cmount, unsigned timeout):
253 pass
254 int ceph_get_file_layout(ceph_mount_info *cmount, int fh, int *stripe_unit, int *stripe_count, int *object_size, int *pg_pool):
255 pass
256 int ceph_get_file_pool_name(ceph_mount_info *cmount, int fh, char *buf, size_t buflen):
257 pass
258 int ceph_get_default_data_pool_name(ceph_mount_info *cmount, char *buf, size_t buflen):
259 pass