mirror of
https://github.com/ceph/ceph
synced 2025-02-22 18:47:18 +00:00
objclass: require each class method to have a flag set
The osd depends on this to set the client op flags for class call ops. Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
This commit is contained in:
parent
135c85a46e
commit
13ba5ec528
@ -49,6 +49,8 @@ int cls_register_method(cls_handle_t hclass, const char *method,
|
|||||||
int flags,
|
int flags,
|
||||||
cls_method_call_t class_call, cls_method_handle_t *handle)
|
cls_method_call_t class_call, cls_method_handle_t *handle)
|
||||||
{
|
{
|
||||||
|
if (!(flags & (CLS_METHOD_RD | CLS_METHOD_WR)))
|
||||||
|
return -EINVAL;
|
||||||
ClassHandler::ClassData *cls = (ClassHandler::ClassData *)hclass;
|
ClassHandler::ClassData *cls = (ClassHandler::ClassData *)hclass;
|
||||||
cls_method_handle_t hmethod =(cls_method_handle_t)cls->register_method(method, flags, class_call);
|
cls_method_handle_t hmethod =(cls_method_handle_t)cls->register_method(method, flags, class_call);
|
||||||
if (handle)
|
if (handle)
|
||||||
|
Loading…
Reference in New Issue
Block a user