]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: object_may_exist always return true when you write an empty object
authorxinxin shu <shuxinxin@chinac.com>
Tue, 7 Jun 2016 04:07:55 +0000 (12:07 +0800)
committerMykola Golub <mgolub@mirantis.com>
Fri, 19 Aug 2016 19:59:06 +0000 (22:59 +0300)
if you write an empty object, object map is updated firstly

Signed-off-by: xinxin shu <shuxinxin@chinac.com>
(cherry picked from commit a54073808146d205d54d6a932a6e0fd750f1dc38)

src/librbd/AioObjectRequest.cc

index af34e8237ee937511a188e6ed1012dad62ded90b..f550b0b49785ec92a1fb2f69d1ebe4fa9deedecd 100644 (file)
@@ -536,7 +536,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());
     }