return r;
}
+int Client::ll_symlinkx(Inode *parent, const char *name, const char *value,
+ Inode **out, struct ceph_statx *stx, unsigned want,
+ unsigned flags, const UserPerm& perms)
+{
+ Mutex::Locker lock(client_lock);
+
+ vinodeno_t vparent = _get_vino(parent);
+
+ ldout(cct, 3) << "ll_symlinkx " << vparent << " " << name << " -> " << value
+ << dendl;
+ tout(cct) << "ll_symlinkx" << std::endl;
+ tout(cct) << vparent.ino.val << std::endl;
+ tout(cct) << name << std::endl;
+ tout(cct) << value << std::endl;
+
+ if (!cct->_conf->fuse_default_permissions) {
+ int r = may_create(parent, perms);
+ if (r < 0)
+ return r;
+ }
+
+ InodeRef in;
+ int r = _symlink(parent, name, value, perms, &in);
+ if (r == 0) {
+ fill_statx(in, statx_to_mask(flags, want), stx);
+ _ll_get(in.get());
+ }
+ tout(cct) << stx->stx_ino << std::endl;
+ ldout(cct, 3) << "ll_symlinkx " << vparent << " " << name
+ << " = " << r << " (" << hex << stx->stx_ino << dec << ")" << dendl;
+ *out = in.get();
+ return r;
+}
+
int Client::_unlink(Inode *dir, const char *name, const UserPerm& perm)
{
ldout(cct, 3) << "_unlink(" << dir->ino << " " << name
const UserPerm& perms);
int ll_symlink(Inode *in, const char *name, const char *value,
struct stat *attr, Inode **out, const UserPerm& perms);
+ int ll_symlinkx(Inode *parent, const char *name, const char *value,
+ Inode **out, struct ceph_statx *stx, unsigned want,
+ unsigned flags, const UserPerm& perms);
int ll_unlink(Inode *in, const char *name, const UserPerm& perm);
int ll_rmdir(Inode *in, const char *name, const UserPerm& perms);
int ll_rename(Inode *parent, const char *name, Inode *newparent,
struct statvfs *stbuf);
int ceph_ll_readlink(struct ceph_mount_info *cmount, struct Inode *in,
char *buf, size_t bufsize, int uid, int gid);
-int ceph_ll_symlink(struct ceph_mount_info *cmount, struct Inode *parent,
- const char *name, const char *value, struct stat *attr,
- struct Inode **in, int uid, int gid);
+int ceph_ll_symlink(struct ceph_mount_info *cmount,
+ Inode *in, const char *name, const char *value,
+ Inode **out, struct ceph_statx *stx,
+ unsigned want, unsigned flags,
+ const UserPerm *perms);
int ceph_ll_rmdir(struct ceph_mount_info *cmount, struct Inode *in,
const char *name, int uid, int gid);
uint32_t ceph_ll_stripe_unit(struct ceph_mount_info *cmount,
extern "C" int ceph_ll_symlink(class ceph_mount_info *cmount,
Inode *in, const char *name,
- const char *value, struct stat *attr,
- Inode **out, int uid, int gid)
+ const char *value, Inode **out,
+ struct ceph_statx *stx, unsigned want,
+ unsigned flags, const UserPerm *perms)
{
- UserPerm perms(uid, gid);
- return (cmount->get_client()->ll_symlink(in, name, value, attr, out, perms));
+ return (cmount->get_client()->ll_symlinkx(in, name, value, out, stx, want,
+ flags, *perms));
}
extern "C" int ceph_ll_rmdir(class ceph_mount_info *cmount,