Method to create a very generic rule the distributes objects across the
specified failure domain type underneath the given root.
Signed-off-by: Sage Weil <sage@inktank.com>
Simple command to find the ip, host, rack, etc. for an OSD. This is better
than 'ceph osd dump | grep ^osd.NNN\ '.
Signed-off-by: Sage Weil <sage@inktank.com>
Removes a condition in Throttle::_reset_max by which the waiting queue is only
Signal()ed if the new maximum is lower than the current maximum.
There is no evidence of a use case where such a restriction would be
useful. In addition waking up a thread when the maximum increases
gives it a chance to immediately continue the suspended process
instead of waiting for the next put().
Create a new test file covering 100% of src/Throttle.{cc,h} lines of code.
The following methods are tested:
* Throttle::Throttle with and without a maximum
* Throttle::~Throttle when each pending Cond is deleted
* Throttle::take
* Throttle::get when updating the maximum ( lower or higher ),
when going to sleep waiting for the count to lower under
the maximum, when going to sleep because another thread is
already asleep waiting
* Throttle::get_or_fail when there is no maximum,
when requesting a count that is larger than the maximum, either
when the current value is under the maximum or above the maximum.
* Throttle::wait when used to reset the maximum and wake up
another thread asleep waiting
All asserts checking the arguments sanity are exercised ( negative argument
for Throttle::take etc. ).
Adds the LGPLv2+ licensing terms to COPYING along with the others.
Adds a Contributors section to the AUTHORS file.
Notes:
Testing asserts outputs verbose error messages that should be silenced
but it does not seem possible.
Signed-off-by: Loic Dachary <loic@dachary.org>
Fixes: #3777
s->env->get() returns char * and not string and can return NULL.
Also, remove some old unused code.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Instead of keeping multiple copies of the user info,
we just treat the key index as a pointer to the actual
user info (indexed by uid). This helps with two issues:
first, it scales better as we don't need to update the
entire set of keys whenever we make any change. Second,
it helps with the uid index atomicity.
One point to keep in mind is that both the links and the
info can be cached, so effect on performance is minimal.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: caleb miles <caleb.miles@inktank.com>
Don't use po::value<string>()->required() since this breaks build on
RHEL/CentOs6. Check if the options are set as in the code of other
ceph parts.
Move some checks up in the code to validate options as soon
as possible. Remove printing 'help' twice, and check it first.
Fix type description.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Signed-off-by: David Zafman <david.zafman@inktank.com>