]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #2283 from somnathr/wip-sd-9145
authorSage Weil <sage@redhat.com>
Wed, 20 Aug 2014 03:56:06 +0000 (20:56 -0700)
committerSage Weil <sage@redhat.com>
Wed, 20 Aug 2014 03:56:06 +0000 (20:56 -0700)
CollectionIndex: Collection name is added to the access_lock name

Reviewed-by: Samuel Just <sam.just@inktank.com>
1  2 
src/os/CollectionIndex.h
src/os/LFNIndex.h

index 734c022fbd0e8a4975406032865aa99c9d912d91,62df19e5297280ef17ba62242e4f3bc66db8098f..cf808c39c9e7ee6ae1e37f40034ffe54d0241ab6
@@@ -180,20 -181,10 +181,22 @@@ protected
    /// Call prior to removing directory
    virtual int prep_delete() { return 0; }
  
-   CollectionIndex():access_lock("CollectionIndex::access_lock"){}
+   CollectionIndex(coll_t collection):
+     access_lock_name ("CollectionIndex::access_lock::" + collection.to_str()), 
+     access_lock(access_lock_name.c_str()) {}
  
 +  /*
 +   * Pre-hash the collection, this collection should map to a PG folder.
 +   *
 +   * @param pg_num            - pg number of the pool this collection belongs to.
 +   * @param expected_num_objs - expected number of objects in this collection.
 +   * @Return 0 on success, an error code otherwise.
 +   */
 +  virtual int pre_hash_collection(
 +      uint32_t pg_num,            ///< [in] pg number of the pool this collection belongs to
 +      uint64_t expected_num_objs  ///< [in] expected number of objects this collection has
 +      ) { assert(0); return 0; }
 +
    /// Virtual destructor
    virtual ~CollectionIndex() {}
  };
Simple merge