]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #4498 from dachary/wip-11342-hammer
authorLoic Dachary <loic@dachary.org>
Mon, 4 May 2015 21:58:37 +0000 (23:58 +0200)
committerLoic Dachary <loic@dachary.org>
Mon, 4 May 2015 21:58:37 +0000 (23:58 +0200)
librbd notification race condition on snap_create

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
1  2 
src/librbd/ImageWatcher.cc
src/librbd/ImageWatcher.h
src/librbd/internal.cc

index 8233633ceb59cd7429140c440c5c3cf0c3ba358d,fd400054766f676f9340ba88e263b50bb88e53a1..b5f7f60f27006c835f393da754e960bdf8e1650f
@@@ -386,14 -387,8 +386,9 @@@ bool ImageWatcher::release_lock(
    }
  
    unlock();
 +  return true;
  }
  
- void ImageWatcher::finalize_header_update() {
-   librbd::notify_change(m_image_ctx.md_ctx, m_image_ctx.header_oid,
-                       &m_image_ctx);
- }
  void ImageWatcher::assert_header_locked(librados::ObjectWriteOperation *op) {
    rados::cls::lock::assert_locked(op, RBD_LOCK_NAME, LOCK_EXCLUSIVE,
                                    encode_lock_cookie(), WATCHER_LOCK_TAG);
index b20d6b1b7a3f1347b441bd5018ed1fa700a17c17,d75e2fe22223fa8f26b919baf1ae1d07b3413afb..ba126ac2ee6f18f9cb89bbde9de8c5e2310d020a
@@@ -210,9 -209,8 +209,8 @@@ namespace librbd 
      int get_lock_owner_info(entity_name_t *locker, std::string *cookie,
                            std::string *address, uint64_t *handle);
      int lock();
 -    void release_lock();
 +    bool release_lock();
      bool try_request_lock();
-     void finalize_header_update();
  
      void schedule_retry_aio_requests(bool use_timer);
      void retry_aio_requests();
Simple merge