]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: remove ceph_stat, ceph_lstat, ceph_fstat, ceph_setattr, and ceph_fsetattr
authorJeff Layton <jlayton@redhat.com>
Mon, 24 Oct 2016 14:02:58 +0000 (10:02 -0400)
committerJeff Layton <jlayton@redhat.com>
Tue, 25 Oct 2016 17:05:06 +0000 (13:05 -0400)
...there are no more callers.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
src/include/cephfs/libcephfs.h
src/libcephfs.cc
src/test/libcephfs/test.cc

index ca8de2066bebd3b49f0dc47634058abb661d9674..117e7368a254af97c896dfded82db095b8216978 100644 (file)
@@ -611,16 +611,6 @@ int ceph_unlink(struct ceph_mount_info *cmount, const char *path);
  */
 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.
  *
@@ -634,29 +624,8 @@ int ceph_stat(struct ceph_mount_info *cmount, const char *path, struct stat *stb
 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.
@@ -667,17 +636,6 @@ int ceph_setattr(struct ceph_mount_info *cmount, const char *relpath, struct sta
  */
 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).
  * 
@@ -939,17 +897,6 @@ int ceph_fsync(struct ceph_mount_info *cmount, int fd, int syncdataonly);
 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.
  *
index bf3d414063b9860c3c83f7c400726cf2700f1f29..f5e31c9ccbdd101861f2b28527a8d5bb7bdc88f0 100644 (file)
@@ -607,15 +607,6 @@ extern "C" int ceph_symlink(struct ceph_mount_info *cmount, const char *existing
   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)
 {
@@ -625,30 +616,6 @@ extern "C" int ceph_statx(struct ceph_mount_info *cmount, const char *path,
                                     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)
 {
@@ -909,13 +876,6 @@ extern "C" int ceph_fallocate(struct ceph_mount_info *cmount, int fd, int mode,
   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)
 {
index 919683f5724e00a76bd9cececd8779fd9bb69321..2f36b40b174ea3e1abe41efc6f23b4da53f795e1 100644 (file)
@@ -1157,7 +1157,6 @@ TEST(LibCephFS, UseUnmounted) {
   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));