From b6c2faeabbe16993e5e4e51534cf3f2136a707ac Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Mon, 24 Oct 2016 10:02:59 -0400 Subject: [PATCH] client: remove ceph_ll_truncate 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 --- src/include/cephfs/libcephfs.h | 2 -- src/libcephfs.cc | 11 ----------- 2 files changed, 13 deletions(-) diff --git a/src/include/cephfs/libcephfs.h b/src/include/cephfs/libcephfs.h index 18c9a8e16a78..3c6334c35e4a 100644 --- a/src/include/cephfs/libcephfs.h +++ b/src/include/cephfs/libcephfs.h @@ -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, diff --git a/src/libcephfs.cc b/src/libcephfs.cc index e867bc7c5df5..0a3fbb290910 100644 --- a/src/libcephfs.cc +++ b/src/libcephfs.cc @@ -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, -- 2.47.3