...there are no more callers.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
*/
int ceph_rename(struct ceph_mount_info *cmount, const char *from, const char *to);
-/**
- * Get a file's statistics and attributes.
- *
- * @param cmount the ceph mount handle to use for performing the stat.
- * @param path the file or directory to get the statistics of.
- * @param stbuf the stat struct that will be filled in with the file's statistics.
- * @returns 0 on success or negative error code on failure.
- */
-int ceph_stat(struct ceph_mount_info *cmount, const char *path, struct stat *stbuf);
-
/**
* Get a file's extended statistics and attributes.
*
int ceph_statx(struct ceph_mount_info *cmount, const char *path, struct ceph_statx *stx,
unsigned int want, unsigned int flags);
-/**
- * Get a file's statistics and attributes, without following symlinks.
- *
- * @param cmount the ceph mount handle to use for performing the stat.
- * @param path the file or directory to get the statistics of.
- * @param stbuf the stat struct that will be filled in with the file's statistics.
- * @returns 0 on success or negative error code on failure.
- */
-int ceph_lstat(struct ceph_mount_info *cmount, const char *path, struct stat *stbuf);
-
/**
* Set a file's attributes.
- *
- * @param cmount the ceph mount handle to use for performing the setattr.
- * @param relpath the path to the file/directory to set the attributes of.
- * @param attr the stat struct that must include attribute values to set on the file.
- * @param mask a mask of all the CEPH_SETATTR_* values that have been set in the stat struct.
- * @returns 0 on success or negative error code on failure.
- */
-int ceph_setattr(struct ceph_mount_info *cmount, const char *relpath, struct stat *attr, int mask);
-
-/**
- * Set a file's attributes (extended version).
*
* @param cmount the ceph mount handle to use for performing the setattr.
* @param relpath the path to the file/directory to set the attributes of.
*/
int ceph_setattrx(struct ceph_mount_info *cmount, const char *relpath, struct ceph_statx *stx, int mask, int flags);
-/**
- * Set a file's attributes.
- *
- * @param cmount the ceph mount handle to use for performing the setattr.
- * @param fd the fd of the open file/directory to set the attributes of.
- * @param attr the stat struct that must include attribute values to set on the file.
- * @param mask a mask of all the stat values that have been set on the stat struct.
- * @returns 0 on success or negative error code on failure.
- */
-int ceph_fsetattr(struct ceph_mount_info *cmount, int fd, struct stat *attr, int mask);
-
/**
* Set a file's attributes (extended version).
*
int ceph_fallocate(struct ceph_mount_info *cmount, int fd, int mode,
int64_t offset, int64_t length);
-/**
- * Get the open file's statistics.
- *
- * @param cmount the ceph mount handle to use for performing the fstat.
- * @param fd the file descriptor of the file to get statistics of.
- * @param stbuf the stat struct of the file's statistics, filled in by the
- * function.
- * @returns 0 on success or a negative error code on failure
- */
-int ceph_fstat(struct ceph_mount_info *cmount, int fd, struct stat *stbuf);
-
/**
* Get an open file's extended statistics and attributes.
*
return cmount->get_client()->symlink(existing, newname, cmount->default_perms);
}
-// inode stuff
-extern "C" int ceph_stat(struct ceph_mount_info *cmount, const char *path,
- struct stat *stbuf)
-{
- if (!cmount->is_mounted())
- return -ENOTCONN;
- return cmount->get_client()->stat(path, stbuf, cmount->default_perms);
-}
-
extern "C" int ceph_statx(struct ceph_mount_info *cmount, const char *path,
struct ceph_statx *stx, unsigned int want, unsigned int flags)
{
want, flags);
}
-extern "C" int ceph_lstat(struct ceph_mount_info *cmount, const char *path,
- struct stat *stbuf)
-{
- if (!cmount->is_mounted())
- return -ENOTCONN;
- return cmount->get_client()->lstat(path, stbuf, cmount->default_perms);
-}
-
-extern "C" int ceph_setattr(struct ceph_mount_info *cmount, const char *relpath,
- struct stat *attr, int mask)
-{
- if (!cmount->is_mounted())
- return -ENOTCONN;
- return cmount->get_client()->setattr(relpath, attr, mask, cmount->default_perms);
-}
-
-extern "C" int ceph_fsetattr(struct ceph_mount_info *cmount, int fd,
- struct stat *attr, int mask)
-{
- if (!cmount->is_mounted())
- return -ENOTCONN;
- return cmount->get_client()->fsetattr(fd, attr, mask, cmount->default_perms);
-}
-
extern "C" int ceph_fsetattrx(struct ceph_mount_info *cmount, int fd,
struct ceph_statx *stx, int mask)
{
return cmount->get_client()->fallocate(fd, mode, offset, length);
}
-extern "C" int ceph_fstat(struct ceph_mount_info *cmount, int fd, struct stat *stbuf)
-{
- if (!cmount->is_mounted())
- return -ENOTCONN;
- return cmount->get_client()->fstat(fd, stbuf, cmount->default_perms);
-}
-
extern "C" int ceph_fstatx(struct ceph_mount_info *cmount, int fd, struct ceph_statx *stx,
unsigned int want, unsigned int flags)
{
EXPECT_EQ(-ENOTCONN, ceph_lremovexattr(cmount, "/path", "name"));
EXPECT_EQ(-ENOTCONN, ceph_setxattr(cmount, "/path", "name", NULL, 0, 0));
EXPECT_EQ(-ENOTCONN, ceph_lsetxattr(cmount, "/path", "name", NULL, 0, 0));
- EXPECT_EQ(-ENOTCONN, ceph_fsetattr(cmount, 0, &st, 0));
EXPECT_EQ(-ENOTCONN, ceph_fsetattrx(cmount, 0, &stx, 0));
EXPECT_EQ(-ENOTCONN, ceph_chmod(cmount, "/path", 0));
EXPECT_EQ(-ENOTCONN, ceph_fchmod(cmount, 0, 0));