*/
bool match_path(std::string_view target_path) const;
+ bool match_fs(std::string_view target_fs) const {
+ return fs_name == target_fs || fs_name.empty() || fs_name == "*";
+ }
+
void encode(ceph::buffer::list& bl) const {
ENCODE_START(1, 1, bl);
encode(uid, bl);
}
for (const MDSCapGrant &g : grants) {
- if (g.match.fs_name == fs_name || g.match.fs_name.empty() ||
- g.match.fs_name == "*") {
+ if (g.match.match_fs(fs_name)) {
if (mask & MAY_READ && g.spec.allow_read()) {
return true;
}