From: Jason Dillaman Date: Fri, 12 Mar 2021 00:44:15 +0000 (-0500) Subject: librbd/io: send alloc_hint when compression hint is set X-Git-Tag: v17.1.0~2632^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b52b5fe06d1f88130b72b8357dbf5630c7cf1cbd;p=ceph.git librbd/io: send alloc_hint when compression hint is set Previously the hint would not be set if the object map indicated the object may exist. Fixes: https://tracker.ceph.com/issues/49690 Signed-off-by: Jason Dillaman --- diff --git a/src/librbd/io/ObjectRequest.cc b/src/librbd/io/ObjectRequest.cc index e4ee152cf36f..87c3cd7dd528 100644 --- a/src/librbd/io/ObjectRequest.cc +++ b/src/librbd/io/ObjectRequest.cc @@ -399,7 +399,8 @@ void AbstractObjectWriteRequest::add_write_hint( neorados::WriteOp *wr) { I *image_ctx = this->m_ictx; std::shared_lock image_locker{image_ctx->image_lock}; - if (image_ctx->object_map == nullptr || !this->m_object_may_exist) { + if (image_ctx->object_map == nullptr || !this->m_object_may_exist || + image_ctx->alloc_hint_flags != 0U) { ObjectRequest::add_write_hint(*image_ctx, wr); } }