From 9ebdab9983b0617a617d673b83aa18197d0e3bdb Mon Sep 17 00:00:00 2001 From: xie xingguo Date: Sun, 9 Oct 2016 20:04:33 +0800 Subject: [PATCH] os/bluestore: fix raw blob encoded size 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 --- src/os/bluestore/bluestore_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os/bluestore/bluestore_types.h b/src/os/bluestore/bluestore_types.h index 5d8642d898c..7be9f069452 100644 --- a/src/os/bluestore/bluestore_types.h +++ b/src/os/bluestore/bluestore_types.h @@ -296,7 +296,7 @@ struct bluestore_blob_t { 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 { -- 2.47.3