int ceph_preadv(ceph_mount_info *cmount, int fd, iovec *iov, int iovcnt, int64_t offset)
int ceph_flock(ceph_mount_info *cmount, int fd, int operation, uint64_t owner)
int ceph_mknod(ceph_mount_info *cmount, const char *path, mode_t mode, dev_t rdev)
+
int ceph_close(ceph_mount_info *cmount, int fd)
int ceph_open(ceph_mount_info *cmount, const char *path, int flags, mode_t mode)
+ int ceph_openat(ceph_mount_info *cmount, int dirfd, const char *relpath, int flags, mode_t mode)
+
int ceph_mkdir(ceph_mount_info *cmount, const char *path, mode_t mode)
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)
int ceph_rmsnap(ceph_mount_info *cmount, const char *path, const char *name)
raise make_ex(ret, "error in open {}".format(path.decode('utf-8')))
return ret
+ def openat(self, dirfd, relpath, flags, mode):
+ self.require_state("mounted")
+
+ relpath = cstr(relpath, 'relpath')
+ cdef:
+ int dirfd_ = dirfd
+ int flags_ = flags
+ char* relpath_ = relpath
+ int mode_ = mode
+
+ with nogil:
+ ret = ceph_openat(self.cluster, dirfd_, relpath_, flags_, mode_)
+ if ret < 0:
+ raise make_ex(ret, f'error in openat {relpath}')
+ return ret
+
+
def close(self, fd):
"""
Close the open file.
pass
int ceph_mknod(ceph_mount_info *cmount, const char *path, mode_t mode, dev_t rdev):
pass
+
int ceph_close(ceph_mount_info *cmount, int fd):
pass
int ceph_open(ceph_mount_info *cmount, const char *path, int flags, mode_t mode):
pass
+ int ceph_openat(ceph_mount_info *cmount, int dirfd, const char *relpath, int flags, mode_t mode):
+ pass
+
int ceph_mkdir(ceph_mount_info *cmount, const char *path, mode_t mode):
pass
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):