diff options
| author | Xiubo Li <xiubli@redhat.com> | 2023-09-25 16:25:20 +0800 |
|---|---|---|
| committer | Ilya Dryomov <idryomov@gmail.com> | 2024-05-23 10:35:46 +0200 |
| commit | 1d17de9534cb5a4c4c380d174cc2f9281b34f89e (patch) | |
| tree | 5598506331f6d9569891f522b033815292cfb728 /fs/ceph/mds_client.h | |
| parent | Linux 6.9 (diff) | |
| download | linux-1d17de9534cb5a4c4c380d174cc2f9281b34f89e.tar.gz linux-1d17de9534cb5a4c4c380d174cc2f9281b34f89e.zip | |
ceph: save cap_auths in MDS client when session is opened
Save the cap_auths, which have been parsed by the MDS, in the opened
session.
[ idryomov: use s64 and u32 instead of int64_t and uint32_t, switch to
bool for root_squash, readable and writeable ]
Link: https://tracker.ceph.com/issues/61333
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Milind Changire <mchangir@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/mds_client.h')
| -rw-r--r-- | fs/ceph/mds_client.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/fs/ceph/mds_client.h b/fs/ceph/mds_client.h index b88e80415224..cc106f1aa7d2 100644 --- a/fs/ceph/mds_client.h +++ b/fs/ceph/mds_client.h @@ -71,6 +71,24 @@ enum ceph_feature_type { struct ceph_fs_client; struct ceph_cap; +#define MDS_AUTH_UID_ANY -1 + +struct ceph_mds_cap_match { + s64 uid; /* default to MDS_AUTH_UID_ANY */ + u32 num_gids; + u32 *gids; /* use these GIDs */ + char *path; /* require path to be child of this + (may be "" or "/" for any) */ + char *fs_name; + bool root_squash; /* default to false */ +}; + +struct ceph_mds_cap_auth { + struct ceph_mds_cap_match match; + bool readable; + bool writeable; +}; + /* * parsed info about a single inode. pointers are into the encoded * on-wire structures within the mds reply message payload. @@ -513,6 +531,9 @@ struct ceph_mds_client { struct rw_semaphore pool_perm_rwsem; struct rb_root pool_perm_tree; + u32 s_cap_auths_num; + struct ceph_mds_cap_auth *s_cap_auths; + char nodename[__NEW_UTS_LEN + 1]; }; |
