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,
}
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,
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);