The maximum length of fixed fields of bluestore_blob_t shall be:
uint64_t sbid ///< 8 bytes
uint32_t compressed_length_orig ///< 4 bytes
uint32_t compressed_length ///< 4 bytes
uint32_t flags ///< 4 bytes
uint8_t csum_type ///< 1 byte
uint8_t csum_chunk_order ///< 1 byte
unused_t unused; ///< 2 bytes
8 + 4 + 4 + 4 + 1 + 1 + 2 = 24
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
int estimate_encoded_size() const {
// conservative upper bound... fixme
- return csum_data.length() + extents.size() * 16 + 48;
+ return csum_data.length() + extents.size() * 16 + 24;
}
bool can_split() const {