Skip to content

Commit e21165b

Browse files
committed
Merge tag 'ceph-for-6.7-rc1' of https://github.com/ceph/ceph-client
Pull ceph updates from Ilya Dryomov: - support for idmapped mounts in CephFS (Christian Brauner, Alexander Mikhalitsyn). The series was originally developed by Christian and later picked up and brought over the finish line by Alexander, who also contributed an enabler on the MDS side (separate owner_{u,g}id fields on the wire). The required exports for mnt_idmap_{get,put}() in VFS have been acked by Christian and received no objection from Christoph. - a churny change in CephFS logging to include cluster and client identifiers in log and debug messages (Xiubo Li). This would help in scenarios with dozens of CephFS mounts on the same node which are getting increasingly common, especially in the Kubernetes world. * tag 'ceph-for-6.7-rc1' of https://github.com/ceph/ceph-client: ceph: allow idmapped mounts ceph: allow idmapped atomic_open inode op ceph: allow idmapped set_acl inode op ceph: allow idmapped setattr inode op ceph: pass idmap to __ceph_setattr ceph: allow idmapped permission inode op ceph: allow idmapped getattr inode op ceph: pass an idmapping to mknod/symlink/mkdir ceph: add enable_unsafe_idmap module parameter ceph: handle idmapped mounts in create_request_message() ceph: stash idmapping in mdsc request fs: export mnt_idmap_get/mnt_idmap_put libceph, ceph: move mdsmap.h to fs/ceph ceph: print cluster fsid and client global_id in all debug logs ceph: rename _to_client() to _to_fs_client() ceph: pass the mdsc to several helpers libceph: add doutc and *_client debug macros support
2 parents 56d428a + 56d2e2c commit e21165b

26 files changed

+2061
-1464
lines changed

fs/ceph/acl.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <linux/slab.h>
1616

1717
#include "super.h"
18+
#include "mds_client.h"
1819

1920
static inline void ceph_set_cached_acl(struct inode *inode,
2021
int type, struct posix_acl *acl)
@@ -31,6 +32,7 @@ static inline void ceph_set_cached_acl(struct inode *inode,
3132

3233
struct posix_acl *ceph_get_acl(struct inode *inode, int type, bool rcu)
3334
{
35+
struct ceph_client *cl = ceph_inode_to_client(inode);
3436
int size;
3537
unsigned int retry_cnt = 0;
3638
const char *name;
@@ -72,8 +74,8 @@ struct posix_acl *ceph_get_acl(struct inode *inode, int type, bool rcu)
7274
} else if (size == -ENODATA || size == 0) {
7375
acl = NULL;
7476
} else {
75-
pr_err_ratelimited("get acl %llx.%llx failed, err=%d\n",
76-
ceph_vinop(inode), size);
77+
pr_err_ratelimited_client(cl, "%llx.%llx failed, err=%d\n",
78+
ceph_vinop(inode), size);
7779
acl = ERR_PTR(-EIO);
7880
}
7981

@@ -105,7 +107,7 @@ int ceph_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
105107
case ACL_TYPE_ACCESS:
106108
name = XATTR_NAME_POSIX_ACL_ACCESS;
107109
if (acl) {
108-
ret = posix_acl_update_mode(&nop_mnt_idmap, inode,
110+
ret = posix_acl_update_mode(idmap, inode,
109111
&new_mode, &acl);
110112
if (ret)
111113
goto out;
@@ -140,7 +142,7 @@ int ceph_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
140142
newattrs.ia_ctime = current_time(inode);
141143
newattrs.ia_mode = new_mode;
142144
newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
143-
ret = __ceph_setattr(inode, &newattrs, NULL);
145+
ret = __ceph_setattr(idmap, inode, &newattrs, NULL);
144146
if (ret)
145147
goto out_free;
146148
}
@@ -151,7 +153,7 @@ int ceph_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
151153
newattrs.ia_ctime = old_ctime;
152154
newattrs.ia_mode = old_mode;
153155
newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
154-
__ceph_setattr(inode, &newattrs, NULL);
156+
__ceph_setattr(idmap, inode, &newattrs, NULL);
155157
}
156158
goto out_free;
157159
}

0 commit comments

Comments
 (0)