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

Method encode

src/erasure-code/ErasureCode.cc:314–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

312}
313
314IGNORE_DEPRECATED
315[[deprecated]]
316int ErasureCode::encode(const set<int> &want_to_encode,
317 const bufferlist &in,
318 map<int, bufferlist> *encoded)
319{
320 unsigned int k = get_data_chunk_count();
321 unsigned int m = get_chunk_count() - k;
322 bufferlist out;
323 int err = encode_prepare(in, *encoded);
324 if (err)
325 return err;
326 encode_chunks(want_to_encode, encoded);
327 for (unsigned int i = 0; i < k + m; i++) {
328 if (want_to_encode.count(i) == 0)
329 encoded->erase(i);
330 }
331 return 0;
332}
333END_IGNORE_DEPRECATED
334
335int ErasureCode::encode(const shard_id_set &want_to_encode,

Callers

nothing calls this directly

Calls 8

get_current_ptrMethod · 0.80
countMethod · 0.45
eraseMethod · 0.45
emptyMethod · 0.45
containsMethod · 0.45
beginMethod · 0.45
atMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected