OpTracker: do not take ops_in_flight_lock to print debugging output

Ask Sam to make sure I'm not confused.

I'm not sure we actually need this function any more, but we certainly
don't need to grab the xlist lock in order to print out this basic data.

Signed-off-by: Greg Farnum <greg@inktank.com>
shared_cache: use a single lookup for lookup() too

We didn't convert this one to use iterators before.

Signed-off-by: Greg Farnum <greg@inktank.com>
WorkQueue: This is a sharded thread pool implementation derived from
ThreadPool. The threadpool function like start/stop/pause/unpause/drain
needed to be overloaded. Some private members needed to be protected. Since
sharded pool thread function will be working on multiple lock/queue
combination the WorkQueue_ interface is modified to expose lock/wait
functionality. The WorkThread interface is also changed to accept the
queue number. For normal threadpool this will be always default to -1.
Since the sharded thread pool is not holding any threadpool level global
lock the functions handling the config change dynamically like
handle_conf_change()is overloaded to no_op.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
This is the fix against Greg's review comment to do a NULL check.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
This is the fix against Greg's comment. The exit(0) was left behind by
mistake.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
Pipe: This is an improvement since we don't need to hold the Pipe::lock during
encode and all.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
OSD: Instead of op_wq, OSD is now using shard_wq which is a vector of
OpShardedQ derived from ThreadPoolSharded::WorkQueueSharded. Each of this
WorkQ has it's own lock/cond/queue. The new sharded threadpool is been
instantiated from OSD and servicing the entire list of shard_wq.
The enqueue_op() is now deviding the request on arrary of workQs based on
the PG hash.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
config opts for sharded thread pool usage.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
shared_cache: expose prior existence when inserting an element

The LRU now handles you attempting to insert multiple values for the
same key, by telling you that you've done so and returning the
existing value before it manages to muck up existing data.

Signed-off-by: Greg Farnum <greg@inktank.com>
FileStore: remove the fdcache_lock

With the changes to the shared_cache, we no longer need the fdcache_lock
to prevent us from inserting a second fd for the same hobject into the cache.

Signed-off-by: Greg Farnum <greg@inktank.com>
FDCache: implement a basic sharding of the FDCache

This is just a basic sharding. A more sophisticated implementation would
rely on something other than luck for keeping the distribution equitable.

Signed-off-by: Greg Farnum <greg@inktank.com>

Conflicts:
	src/common/config_opts.h

Resolved the conflicts and did a commit.

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