Skip to content

Commit

Permalink
Merge pull request ceph#10313 from ceph/objclass-perm-feedback
Browse files Browse the repository at this point in the history
Objclass perm feedback

Reviewed-by: Kefu Chai <[email protected]>
  • Loading branch information
tchaikov authored Jul 19, 2016
2 parents 8657800 + d11a6be commit 6199d2e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
11 changes: 11 additions & 0 deletions PendingReleaseNotes
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@
is defined in the "mon_dns_srv_name" config option, which defaults to
"ceph-mon".

* The 'osd class load list' config option is a list of object class names that
the OSD is permitted to load (or '*' for all classes). By default it
contains all existing in-tree classes for backwards compatibility.

* The 'osd class default list' config option is a list of object class names
(or '*' for all classes) that clients may invoke having only the '*', 'x',
'class-read', or 'class-write' capabilities. By default it contains all
existing in-tree classes for backwards compatibility. Invoking classes not
listed in 'osd class default list' requires a capability naming the class
(e.g. 'allow class foo').

11.0.0
------

Expand Down
5 changes: 1 addition & 4 deletions src/osd/ClassHandler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,7 @@ bool ClassHandler::in_class_list(const std::string& cname,
auto it = std::find_first_of(begin, end,
targets.begin(), targets.end());

if (it == end)
return false;

return true;
return it != end;
}

ClassHandler::ClassData *ClassHandler::_get_class(const string& cname,
Expand Down
2 changes: 1 addition & 1 deletion src/osd/ClassHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class ClassHandler
ClassData *_get_class(const string& cname, bool check_allowed);
int _load_class(ClassData *cls);

bool in_class_list(const std::string& cname,
static bool in_class_list(const std::string& cname,
const std::string& list);

public:
Expand Down

0 comments on commit 6199d2e

Please sign in to comment.