WorkQueue: Signal the threads during drain()
After the work queue is been drained, signal the waiting thread
for it's normal activity.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
shared_cache: Cache interfaces are cpu optimized
The interfaces are modified to take the parameter
as const ref.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
shared_cache:The lookup function is optimized
Rather than count and again accessing the value, used find for
lookup once.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
shared_cache: Added a new 'add' interface
This new interface will look for the existance of an object
and adding of an object in case not there atomically.
This new interface is been called from FDCache and subsequently
from filestore::lfn_open. This way we can get rid of global
fdcache_lock.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
FileStore: _lookup() is made pure virtual
The newly overridden cpu optimized _lookup() function is
made pure virtual so that all the derived class has to
implement it.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
ReplicatedPG: Not going for snapset context while head read
There is no need to collect snapset context in case of head read.
But, in some cases like prep_object_replica_pushes() needs
snapset context even for read head. To incorporate such exception
get_object_context() interface is changed to introduce a flag
to override the need of snapset. In some cases while objectcontext
is in cache, the next call may come for write and that need a
snapset context. This is the reason the need of snapset context
is verified after cache hit and populate accordingly.

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