]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
compressor/zstd: correct buffer end detection using get_remaining() 64682/head
authorIgor Fedotov <igor.fedotov@croit.io>
Thu, 24 Jul 2025 22:30:55 +0000 (01:30 +0300)
committerIgor Fedotov <igor.fedotov@croit.io>
Fri, 25 Jul 2025 11:05:42 +0000 (14:05 +0300)
commit54b4582199d7273c2da1e291c51fd436c2b54813
treea174b491b35c47160ff9cf1e752ef40a039abce7
parent407e9b7521bda0b9b3a25589599ff76263bb9231
compressor/zstd: correct buffer end detection using get_remaining()

Replace p.end() check with get_remaining() to properly detect buffer
exhaustion. The source bufferlist may contain empty pointers at the end,
causing p.end() to return false even when all data has been processed
during compression.

Signed-off-by: Igor Fedotov <igor.fedotov@croit.io>
src/compressor/zstd/ZstdCompressor.h
src/test/compressor/test_compression.cc