]>
git.proxmox.com Git - ceph.git/blob - ceph/src/os/bluestore/zoned_types.cc
1 #include "zoned_types.h"
6 std::ostream
& operator<<(std::ostream
& out
,
7 const zone_state_t
& zone_state
) {
8 return out
<< " zone: 0x" << std::hex
9 << " dead bytes: 0x" << zone_state
.get_num_dead_bytes()
10 << " write pointer: 0x" << zone_state
.get_write_pointer()
14 void zone_state_t::encode(ceph::buffer::list
&bl
) const {
15 uint64_t v
= static_cast<uint64_t>(num_dead_bytes
) << 32 | write_pointer
;
19 void zone_state_t::decode(ceph::buffer::list::const_iterator
&p
) {
22 num_dead_bytes
= v
>> 32;
23 write_pointer
= v
; // discard left-most 32 bits