]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: allow all types of MDS caps
authorRishabh Dave <ridave@redhat.com>
Sun, 30 Apr 2023 13:01:00 +0000 (18:31 +0530)
committerRishabh Dave <ridave@redhat.com>
Wed, 8 Nov 2023 17:11:43 +0000 (22:41 +0530)
commitf9720b2f1bf05951517708a973afb049bde63c1f
treee1f730b0ca250bd0733a4af0258e52adb818c8ea
parent252bbf8bfa6369b5e72f62e765b64af35a91bb75
mds: allow all types of MDS caps

MDS caps can contain 5 components: name of a CephFS, a path inside
CephFS, a flag for enabling root squashing mechanism, a UID and list of
GIDs. These 5 components result in 31 combinations, so there can be 31
types of MDS caps. Out of these, the current main branch only allows 11
combinations. This restriction is strange and inappropriate. Ideally,
all combinations should be allowed.

This strange restriction must've been created unintentionally by
previous developers while adding FS name and root squash to MDS caps. A
TODO for a allowing a subset of these combination was also left in
codebase:
https://github.com/ceph/ceph/blob/reef/src/mds/MDSAuthCaps.cc#L69

Fixes: https://tracker.ceph.com/issues/59388
Signed-off-by: Rishabh Dave <ridave@redhat.com>
(cherry picked from commit 0c36929f258f2b32ded16bfaf40f99c27b668f44)

Conflicts:
src/mds/MDSAuthCaps.cc
- Unlike main branch, in Reef branch, string was being used in
  the conflicted code by writing std::string.
src/mds/MDSAuthCaps.cc
src/mds/MDSAuthCaps.h