diff options
Diffstat (limited to 'src/common/bit_vector.hpp')
-rw-r--r-- | src/common/bit_vector.hpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/common/bit_vector.hpp b/src/common/bit_vector.hpp index 62d924d984f..c15b0927e37 100644 --- a/src/common/bit_vector.hpp +++ b/src/common/bit_vector.hpp @@ -231,8 +231,11 @@ void BitVector<_b>::decode_data(bufferlist::iterator& it, uint64_t byte_offset) while (byte_offset < end_offset) { uint64_t len = MIN(BLOCK_SIZE, end_offset - byte_offset); + bufferptr ptr; + it.copy_deep(len, ptr); + bufferlist bit; - it.copy(len, bit); + bit.append(ptr); if (m_crc_enabled && m_data_crcs[byte_offset / BLOCK_SIZE] != bit.crc32c(0)) { throw buffer::malformed_input("invalid data block CRC"); |