]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: object_may_exist always return true when you write an empty object 9535/head
authorxinxin shu <shuxinxin@chinac.com>
Tue, 7 Jun 2016 04:07:55 +0000 (12:07 +0800)
committerxinxin shu <shuxinxin@chinac.com>
Wed, 8 Jun 2016 07:21:31 +0000 (15:21 +0800)
if you write an empty object, object map is updated firstly

Signed-off-by: xinxin shu <shuxinxin@chinac.com>
src/librbd/AioObjectRequest.cc

index 77aaa7e1f61f9ec01c7a3020e058c9d9959ccd24..f2303010a5d78488f3d78eb1ea26f5b25159bd68 100644 (file)
@@ -538,7 +538,7 @@ namespace librbd {
     RWLock::RLocker snap_locker(m_ictx->snap_lock);
     if (m_ictx->enable_alloc_hint &&
         (m_ictx->object_map == nullptr ||
-         !m_ictx->object_map->object_may_exist(m_object_no))) {
+         !m_object_exist)) {
       wr->set_alloc_hint(m_ictx->get_object_size(), m_ictx->get_object_size());
     }