From: Jianpeng Ma Date: Fri, 19 Jun 2015 06:50:26 +0000 (+0800) Subject: librbd: If objectmap tell object exist, don't send alloc_hint w/ write command. X-Git-Tag: v9.0.3~145^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=449948edb7cbd3e0c2dea0215cd94be0a6875798;p=ceph.git librbd: If objectmap tell object exist, don't send alloc_hint w/ write command. Signed-off-by: Jianpeng Ma --- diff --git a/src/librbd/AioRequest.cc b/src/librbd/AioRequest.cc index 5a8a81949488..0bfadc841b5a 100644 --- a/src/librbd/AioRequest.cc +++ b/src/librbd/AioRequest.cc @@ -506,7 +506,7 @@ namespace librbd { } void AioWrite::add_write_ops(librados::ObjectWriteOperation *wr) { - if (m_ictx->enable_alloc_hint) + if (m_ictx->enable_alloc_hint && !m_ictx->object_map.object_may_exist(m_object_no)) wr->set_alloc_hint(m_ictx->get_object_size(), m_ictx->get_object_size()); wr->write(m_object_off, m_write_data); wr->set_op_flags2(m_op_flags);