| 19 | CLS_NAME(queue) |
| 20 | |
| 21 | static int cls_queue_init(cls_method_context_t hctx, bufferlist *in, bufferlist *out) |
| 22 | { |
| 23 | auto in_iter = in->cbegin(); |
| 24 | cls_queue_init_op op; |
| 25 | try { |
| 26 | decode(op, in_iter); |
| 27 | } catch (ceph::buffer::error& err) { |
| 28 | CLS_LOG(1, "ERROR: cls_queue_init_op(): failed to decode entry\n"); |
| 29 | return -EINVAL; |
| 30 | } |
| 31 | |
| 32 | return queue_init(hctx, op); |
| 33 | } |
| 34 | |
| 35 | static int cls_queue_get_capacity(cls_method_context_t hctx, bufferlist *in, bufferlist *out) |
| 36 | { |