]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
client: Use nearest fscrypt block when clamping max io size
authorChristopher Hoffman <choffman@redhat.com>
Mon, 20 Oct 2025 18:15:11 +0000 (18:15 +0000)
committerChristopher Hoffman <choffman@redhat.com>
Wed, 5 Nov 2025 13:59:36 +0000 (13:59 +0000)
commitae65b1b3e35c75608348a55b2bfa9d57c691d964
treed66acc381e5e2d6fb4d1223c61aa554fb6f2215b
parent72e7040f7f82cd172ab3b27db0551140be9ba3d7
client: Use nearest fscrypt block when clamping max io size

A max io size can currently be up to INT_MAX. If it is greater,
then clamp the size to INT_MAX. This conflicts with fscrypt io
operations. An fscrypt, op needs to read a whole fscrypt block.
The size of fscrypt block size is 4K, INT_MAX % 4K is not equal
to 0. Therefore, get the nearest multiple of 4K to INT_MAX that
does not go over. In the fscrypt case, this value will be used
for clamping max io size.

Fixes: https://tracker.ceph.com/issues/73346
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
src/client/Client.cc
src/client/FSCrypt.h