From: xie xingguo Date: Sun, 9 Oct 2016 12:04:33 +0000 (+0800) Subject: os/bluestore: fix raw blob encoded size X-Git-Tag: v11.1.0~690^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9ebdab9983b0617a617d673b83aa18197d0e3bdb;p=ceph.git 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 --- diff --git a/src/os/bluestore/bluestore_types.h b/src/os/bluestore/bluestore_types.h index 5d8642d898c9..7be9f069452d 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 {