From: Sage Weil Date: Wed, 20 Aug 2014 03:56:06 +0000 (-0700) Subject: Merge pull request #2283 from somnathr/wip-sd-9145 X-Git-Tag: v0.86~239 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b3624500e15f3acee1d1447f2e95f791bf8dff58;p=ceph.git Merge pull request #2283 from somnathr/wip-sd-9145 CollectionIndex: Collection name is added to the access_lock name Reviewed-by: Samuel Just --- b3624500e15f3acee1d1447f2e95f791bf8dff58 diff --cc src/os/CollectionIndex.h index 734c022fbd0e,62df19e52972..cf808c39c9e7 --- a/src/os/CollectionIndex.h +++ b/src/os/CollectionIndex.h @@@ -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() {} };