crush: add adjust_subtree_weight()

Adjust the weight for all (leaf) items beneath a subtree.

Signed-off-by: Sage Weil <sage@inktank.com>
mon/OSDMonitor: add 'osd crush reweight-subtree ...'

Reweight all items within a subtree.  For example, you might reweigh tall
OSDs within a rack to a new value.

Signed-off-by: Sage Weil <sage@inktank.com>
mon/OSDMonitor: simplify 'osd crush reweight ...' flow

Use the goto labels; drop the do/while.

Signed-off-by: Sage Weil <sage@inktank.com>
ceph-common: Implementation of the sharded threadpool.
Threadpool will only be having a single work queue and internally the
work queue will be having multiple storage data structures.
Based on some logic (which is derived class implementation specific)
the work queue will shard the requests among these storage structures.
Each storage will be guarded by finer grained sunchronization
objects. Sharded threadpool threads will be assigned to work on a
shard based on some algorithm which is again derived class implementation
specific.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
OSD: Sharded Op worker queue implementation for handling OSD ops
This is the implementation for the client of the
sharded thread pool/sharded workQ. Removed the op_wq class and now OSD
ops are going through sharded workqueue model which is used by the
sharded threadpool. Derived ShardedOpWQ implementation has a data structure
called ShardData which has it's own lock/cond and storage. ShardedOpWQ
holds a vector of that and the size of the vector is a config option.
During enqueue operation on the queue, the ops are sharded across these
ShardData based on pg hash % number of shards.
Similarly, in the _process function the sharded thread pool threads are
divided across ShardData based on thread index % number of shards

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
ceph-common: The Sharded threadpool worker logic changed
Now, the _process() of the derived queue is processing one request
at a time and the outer loop is controlled by the sharded threadpool.
The stop/pause/drain functionalities are controlled by the sharded TP.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
OSD:Derived sharded queue implementation is changed
All the threadpool related stuff like stop/pause/drain etc. are not
handled by sharded queue anymore. All it is implementing are related to
processing,enqueue , signaling of waiting threads and shard queue status.
The pg ordering is been taken care of by introducing a map <pg,op> in each
shard.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
WorkQueue: Taking care of potential race condition during pause()
Introduced two variables to keep track of number of threads paused
and drained during threadpool pause/drain. The pause()/drain() call
is waiting till number of pause/drain threads equals to toral number of
thread pool threads.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
WorkQueue: Removed the unused in_process variable

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
WorkQueue: The variable name is corrected.
Modified the variable name from shardedpol_cond->shardedpool_cond

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
Make KeyValueStore support "ceph osd perf" command

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
Fix keyvaluestore fiemap bug

The result of fiemap is wrong and the offset get from
"StripObjectMap::file_to_extents" need to multiply by sequence number

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
Populate AUTHORS when distribute

Adds a complete list of contributors in a
distributed package.

Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@cloudwatt.com>
Populate ChangeLog when distribute

Generates ChangeLog from git history for a
distributed package.

Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@cloudwatt.com>
Extracted RadosXattrIter from librados.cc into independent .h anc .cc files.
This makes this interface usable by clients of librados.

Signed-off-by: Sebastien Ponce <sebastien.ponce@cern.ch>
Fixed missing include of assert.h in RWLock interface

Signed-off-by: Sebastien Ponce <sebastien.ponce@cern.ch>
Fixed usage of rhel_version in spec file : it should have been rhel

Signed-off-by: Sebastien Ponce <sebastien.ponce@cern.ch>
Added const qualifiers for the layout argument of file_to_extents and object_truncate_size

Signed-off-by: Sebastien Ponce <sebastien.ponce@cern.ch>
Completed librados documentation of rados_write_op_cmpxattr and rados_read_op_cmpxattr concerning their error reporting

Signed-off-by: Sebastien Ponce <sebastien.ponce@cern.ch>
Added a striper interface on top of rados called radosstriper.

This interface allows to manipulate striped objects stored in a rados cluster with a standard open/read/write/stat/close/remove API.
Asynchronous APIs are also provided for data transfers and both C and C++ APIs are present.

Signed-off-by: Sebastien Ponce <sebastien.ponce@cern.ch>