]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common/fs_types: combine several fixed-size `encode()` calls
authorMax Kellermann <max.kellermann@ionos.com>
Thu, 10 Oct 2024 11:33:17 +0000 (13:33 +0200)
committerMax Kellermann <max.kellermann@ionos.com>
Mon, 9 Dec 2024 11:35:17 +0000 (12:35 +0100)
commitb27c8015a05984ce60284e23db8c90f3247840ff
treececcd8cadaeefdf1653ae4b43d64a3277c966629
parent99f58a5fa1188094f9e4eaaf2208331b52ef2ba8
common/fs_types: combine several fixed-size `encode()` calls

The `denc` library allows appending multiple values in a single
`buffer::list` call by wrapping them in a `std::tuple`.  This reduces
overhead because the buffer bounds checks have to be performed only
once.

The `file_layout_t` type turned up in the profiler, so it was an
obvious choice to optimize now.

Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
src/common/fs_types.cc