The IndexManager get_index is been modified to take care of a race
condition. Now, Index is not a shared_ptr but a ptr to CollectionIndex*.
We are caching those CollectionIndex* throughout the lifetime of an OSD.
Introduced a RWLock within a Collection Index that will make sure of the
exclusive access in case of write path.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
shared_cache::add implementation was wrong and that is fixed.
Optimized the cache interface to take the param by reference.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
New Sharded TP worker was not resetting the suicide timeout value
properly.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
The changes in this commit are related to going back to old getattr, read
and lfn_open() interface. The lfn_open is now using the new IndexManager
::get_index interface and using the CollectionIndex::RWLock to give the
exclusing CollectionIndex* access while write is going on.
Needed to pass one extra boolean to getattr interface to identify the IO
path so that we can get rid of extra attribute name computation.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
Effort for making a single path for the IO operation.
LFNIndex::lookup() is now the interface which will be invoked by all
IO operation.
The most cpu expensive function lfn_generate_object_name() is now
a single routine that is been invoked by all other parts.
Overloaded function is removed.

Overloaded HashIndex::_lookup() is now modified to return the mangled
name as well.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
Removed the redundant map introduced for the fast path

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
Optimized the functions to send shared_ptr by const reference.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>