From 200fc5b2f24859109a79002e30927d457971b939 Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Thu, 16 Jan 2020 14:53:37 -0500 Subject: [PATCH] librbd: support compression allocation hints to the OSD A new "rbd_compression_hint" configuration option can be applied globally, at the pool level, or to individual images to send the associated compression allocation hint to the OSD on write operations. Fixes: https://tracker.ceph.com/issues/42097 Signed-off-by: Jason Dillaman --- src/common/options.cc | 6 ++++++ src/librbd/ImageCtx.cc | 8 ++++++++ src/librbd/ImageCtx.h | 1 + src/librbd/io/ObjectRequest.cc | 7 +++++-- src/test/librados_test_stub/LibradosTestStub.cc | 11 ++++++++++- src/test/librados_test_stub/TestIoCtxImpl.cc | 1 + src/test/librados_test_stub/TestIoCtxImpl.h | 1 + src/test/librados_test_stub/TestMemIoCtxImpl.cc | 1 + src/test/librados_test_stub/TestMemIoCtxImpl.h | 2 +- src/test/librbd/mock/MockImageCtx.h | 2 ++ 10 files changed, 36 insertions(+), 4 deletions(-) diff --git a/src/common/options.cc b/src/common/options.cc index cf0bc134e20..51d5d48080f 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -7164,6 +7164,12 @@ static std::vector