]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: remove ceph_ll_truncate
authorJeff Layton <jlayton@redhat.com>
Mon, 24 Oct 2016 14:02:59 +0000 (10:02 -0400)
committerJeff Layton <jlayton@redhat.com>
Tue, 25 Oct 2016 17:06:28 +0000 (13:06 -0400)
It's just a wrapper around ceph_ll_setattr that is only called from the
ganesha SETATTR handler. There's no need for special casing truncate
handling.

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

index 18c9a8e16a781fca3a4467d2541595a9dffc5812..3c6334c35e4a48cb2dd4415cad665a8bc8c09ccd 100644 (file)
@@ -1491,8 +1491,6 @@ int ceph_ll_mkdir(struct ceph_mount_info *cmount, struct Inode *parent,
 int ceph_ll_link(struct ceph_mount_info *cmount, struct Inode *in,
                 struct Inode *newparrent, const char *name,
                 struct stat *attr, int uid, int gid);
-int ceph_ll_truncate(struct ceph_mount_info *cmount, struct Inode *in,
-                    uint64_t length, int uid, int gid);
 int ceph_ll_opendir(struct ceph_mount_info *cmount, struct Inode *in,
                    struct ceph_dir_result **dirpp, int uid, int gid);
 int ceph_ll_releasedir(struct ceph_mount_info *cmount,
index e867bc7c5df5ebfedfec622a3a173bc5fc24c799..0a3fbb290910524b3f187d096131e60f47e6a20d 100644 (file)
@@ -1576,17 +1576,6 @@ extern "C" int ceph_ll_link(class ceph_mount_info *cmount,
   return (cmount->get_client()->ll_link(in, newparent, name, attr, perms));
 }
 
-extern "C" int ceph_ll_truncate(class ceph_mount_info *cmount,
-                               Inode *in, uint64_t length, int uid,
-                               int gid)
-{
-  struct ceph_statx stx;
-  stx.stx_size = length;
-  UserPerm perms(uid, gid);
-
-  return(cmount->get_client()->ll_setattrx(in, &stx, CEPH_SETATTR_SIZE, perms));
-}
-
 extern "C" int ceph_ll_opendir(class ceph_mount_info *cmount,
                               Inode *in,
                               struct ceph_dir_result **dirpp,