]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: rename ceph_ll_getattrx to ceph_ll_getattr, and drop the original
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:05:18 +0000 (13:05 -0400)
Signed-off-by: Jeff Layton <jlayton@redhat.com>
src/include/cephfs/libcephfs.h
src/libcephfs.cc
src/test/libcephfs/test.cc

index f1974bfcf790a95b8a0407245ebe4e4ae0c25741..14d400337ece497ca20b703b0f6a4ddcb0fa5d0b 100644 (file)
@@ -1435,10 +1435,8 @@ int ceph_ll_walk(struct ceph_mount_info *cmount, const char *name,
                 struct Inode **i,
                 struct stat *attr);
 int ceph_ll_getattr(struct ceph_mount_info *cmount, struct Inode *in,
-                   struct stat *attr, int uid, int gid);
-int ceph_ll_getattrx(struct ceph_mount_info *cmount, struct Inode *in,
                    struct ceph_statx *stx, unsigned int want, unsigned int flags,
-                   int uid, int gid);
+                   const UserPerm *perms);
 int ceph_ll_setattr(struct ceph_mount_info *cmount, struct Inode *in,
                    struct stat *st, int mask, int uid, int gid);
 int ceph_ll_setattrx(struct ceph_mount_info *cmount, struct Inode *in,
index 6b3dca649c07c9f3a516f339a64cb9d21fd69069..1f9c92030bbdef2425340c373eeb6e5498b75a01 100644 (file)
@@ -1430,20 +1430,11 @@ extern "C" int ceph_ll_walk(class ceph_mount_info *cmount, const char *name,
 }
 
 extern "C" int ceph_ll_getattr(class ceph_mount_info *cmount,
-                              Inode *in, struct stat *attr,
-                              int uid, int gid)
-{
-  UserPerm perms(uid, gid);
-  return (cmount->get_client()->ll_getattr(in, attr, perms));
-}
-
-extern "C" int ceph_ll_getattrx(class ceph_mount_info *cmount,
-                               Inode *in, struct ceph_statx *stx,
-                               unsigned int want, unsigned int flags,
-                               int uid, int gid)
+                              Inode *in, struct ceph_statx *stx,
+                              unsigned int want, unsigned int flags,
+                              const UserPerm *perms)
 {
-  UserPerm perms(uid, gid);
-  return (cmount->get_client()->ll_getattrx(in, stx, want, flags, perms));
+  return (cmount->get_client()->ll_getattrx(in, stx, want, flags, *perms));
 }
 
 extern "C" int ceph_ll_setattr(class ceph_mount_info *cmount,
index 2f36b40b174ea3e1abe41efc6f23b4da53f795e1..96a5607977ff89c73382ef82807597f35f04a6bb 100644 (file)
@@ -1581,7 +1581,7 @@ TEST(LibCephFS, LazyStatx) {
   ASSERT_EQ(ceph_ll_setattr(cmount1, file1, &st, CEPH_SETATTR_MODE, getuid(), getgid()), 0);
 
   struct ceph_statx    stx;
-  ASSERT_EQ(ceph_ll_getattrx(cmount2, file2, &stx, CEPH_STATX_CTIME, AT_NO_ATTR_SYNC, getuid(), getgid()), 0);
+  ASSERT_EQ(ceph_ll_getattr(cmount2, file2, &stx, CEPH_STATX_CTIME, AT_NO_ATTR_SYNC, ceph_mount_perms(cmount2)), 0);
   ASSERT_TRUE(stx.stx_mask & CEPH_STATX_CTIME);
   ASSERT_TRUE(stx.stx_ctime.tv_sec == old_ctime.tv_sec &&
              stx.stx_ctime.tv_nsec == old_ctime.tv_nsec);