]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commit
libcephfs_proxy: fix protocol structures for backward compatibility
authorXavi Hernandez <xhernandez@gmail.com>
Mon, 1 Sep 2025 09:22:05 +0000 (11:22 +0200)
committerXavi Hernandez <xhernandez@gmail.com>
Wed, 10 Sep 2025 08:03:00 +0000 (10:03 +0200)
commit9c1db527dab5f7e40f35f30dfc3a3896c1032c4e
tree3e664f7bc2cd61eea85281ad75999efa16b89208
parent43117b9616f77f5e89b334db6f1f444901238626
libcephfs_proxy: fix protocol structures for backward compatibility

The structures used for transferring data between the proxy client and
the proxy daemon had been reworked in a recent change to be able to
expand the protocol. This caused an inconsistency in the size of the
data transferred when communication with a peer using the older version.
The result was that the peer receiving the data with an unexpected size
was closing the connection, causing unexpected errors.

The discrepancy in size is the result of how compilers pad structures
combined with the change in the structure layout introduced when
extending the protocol. With these changes, the computation of the size
of each version of the structures was not done correctly.

This change makes the layout equal to the older version, so that
computing the size of the structures becomes easier and doesn't depend
on unexpected paddings.

Fixes: https://tracker.ceph.com/issues/72800
Signed-off-by: Xavi Hernandez <xhernandez@gmail.com>
(cherry picked from commit 62e917148496bce299f4cd48342765b73b9950a8)
src/libcephfs_proxy/proxy_requests.h