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

Function queue_get_capacity

src/cls/queue/cls_queue_src.cc:140–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140int queue_get_capacity(cls_method_context_t hctx, cls_queue_get_capacity_ret& op_ret)
141{
142 //get head
143 cls_queue_head head;
144 int ret = queue_read_head(hctx, head);
145 if (ret < 0) {
146 return ret;
147 }
148
149 op_ret.queue_capacity = head.queue_size - head.max_head_size;
150
151 CLS_LOG(20, "INFO: queue_get_capacity: size of queue is %lu", op_ret.queue_capacity);
152
153 return 0;
154}
155
156
157/*

Callers 2

cls_queue_get_capacityFunction · 0.85

Calls 1

queue_read_headFunction · 0.85

Tested by

no test coverage detected