MCPcopy Create free account
hub / github.com/ceph/ceph / cls_2pc_queue_init

Function cls_2pc_queue_init

src/cls/2pc_queue/cls_2pc_queue.cc:34–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34static int cls_2pc_queue_init(cls_method_context_t hctx, bufferlist *in, bufferlist *out) {
35 auto in_iter = in->cbegin();
36
37 cls_queue_init_op op;
38 try {
39 decode(op, in_iter);
40 } catch (ceph::buffer::error& err) {
41 CLS_LOG(1, "ERROR: cls_2pc_queue_init: failed to decode entry: %s", err.what());
42 return -EINVAL;
43 }
44
45 cls_2pc_urgent_data urgent_data;
46
47 cls_queue_init_op init_op;
48
49 CLS_LOG(20, "INFO: cls_2pc_queue_init: max size is %lu (bytes)", op.queue_size);
50
51 init_op.queue_size = op.queue_size;
52 init_op.max_urgent_data_size = 23552; // overall head is 24KB ~ pending 1K reservations ops
53 encode(urgent_data, init_op.bl_urgent_data);
54
55 return queue_init(hctx, init_op);
56}
57
58static int cls_2pc_queue_get_capacity(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
59{

Callers 2

add_persistent_topicFunction · 0.50
TEST_FFunction · 0.50

Calls 5

queue_initFunction · 0.85
decodeFunction · 0.50
encodeFunction · 0.50
cbeginMethod · 0.45
whatMethod · 0.45

Tested by 1

TEST_FFunction · 0.40