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

Method append_hole

src/common/buffer.cc:1462–1480  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1460 }
1461
1462 buffer::list::contiguous_filler buffer::list::append_hole(const unsigned len)
1463 {
1464 _len += len;
1465
1466 if (unlikely(get_append_buffer_unused_tail_length() < len)) {
1467 // make a new append_buffer. fill out a complete page, factoring in
1468 // the raw_combined overhead.
1469 auto& new_back = refill_append_space(len);
1470 new_back.set_length(len);
1471 return { new_back.c_str() };
1472 } else if (unlikely(_carriage != &_buffers.back())) {
1473 auto bptr = ptr_node::create(*_carriage, _carriage->length(), 0);
1474 _carriage = bptr.get();
1475 _buffers.push_back(*bptr.release());
1476 _num += 1;
1477 }
1478 _carriage->set_length(_carriage->length() + len);
1479 return { _carriage->end_c_str() - len };
1480 }
1481
1482 void buffer::list::prepend_zero(unsigned len)
1483 {

Callers 15

fscrypt_hex_strFunction · 0.45
hex_strFunction · 0.45
initMethod · 0.45
decrypt_blMethod · 0.45
encrypt_blMethod · 0.45
encode_inodestatMethod · 0.45
append_blFunction · 0.45
read_userMethod · 0.45
load_bucketMethod · 0.45
readMethod · 0.45
completeMethod · 0.45
get_infoMethod · 0.45

Calls 10

set_lengthMethod · 0.80
end_c_strMethod · 0.80
createFunction · 0.70
c_strMethod · 0.45
backMethod · 0.45
lengthMethod · 0.45
getMethod · 0.45
push_backMethod · 0.45
releaseMethod · 0.45

Tested by 1

TESTFunction · 0.36