From: Adam Kupczyk Date: Fri, 1 Mar 2024 14:01:08 +0000 (+0000) Subject: os/bluestore: Mute warnings X-Git-Tag: v19.2.1~88^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F59217%2Fhead;p=ceph.git os/bluestore: Mute warnings + simplify op_bl size estimation + fix seq size estimation + skip useless calculation of crc32c Signed-off-by: Adam Kupczyk (cherry picked from commit 4acd7beed7b3f5b457e8641313f9384c36ae6140) --- diff --git a/src/os/bluestore/bluefs_types.cc b/src/os/bluestore/bluefs_types.cc index ff9c96ab660..5b2281a9ffd 100644 --- a/src/os/bluestore/bluefs_types.cc +++ b/src/os/bluestore/bluefs_types.cc @@ -228,21 +228,15 @@ std::ostream& operator<<(std::ostream& out, const bluefs_fnode_delta_t& delta) // bluefs_transaction_t -DENC_HELPERS void bluefs_transaction_t::bound_encode(size_t &s) const { - uint32_t crc = op_bl.crc32c(-1); - DENC_START(1, 1, s); + uint32_t crc = -1; + s += 1; // version + s += 1; // compat + s += 4; // size denc(uuid, s); - denc_varint(seq, s); - // not using bufferlist encode method, as it merely copies the bufferptr and not - // contents, meaning we're left with fragmented target bl - __u32 len = op_bl.length(); - denc(len, s); - for (auto& it : op_bl.buffers()) { - s += it.length(); - } + denc(seq, s); + denc(op_bl, s); denc(crc, s); - DENC_FINISH(s); } void bluefs_transaction_t::encode(bufferlist& bl) const