First, add the ability to modify max_file_size. While we are at it, move
to a more sensible interface for adjusting max_mds too.
Signed-off-by: Sage Weil <sage@inktank.com>
Add check of is_max() before updating an unset pool
Use efficient is_max() instead of compare with hobject::get_max()
Signed-off-by: David Zafman <david.zafman@inktank.com>
Fix assert(is_degraded_object(soid)) in ReplicatedPG::wait_for_degraded_object()
Use last_backfill_started as the backfill line
Handle uncommon case of multi op source after backfill line and target before
backfill line and !is_degraded_object().
Include backfill line itself for before_backfill (<= instead of <)
Signed-off-by: David Zafman <david.zafman@inktank.com>
Set the OSD superblock CEPH_OSD_FEATURE_INCOMPAT_SHARDS and
notify the filestore through set_allow_sharded_objects() in that order.
Signed-off-by: David Zafman <david.zafman@inktank.com>
We can remove this CompatSet bit without worry because the only
way it could have been set is if an erasure coded pool was create.
This isn't supported as of yet.
Signed-off-by: David Zafman <david.zafman@inktank.com>
The input buffer is copied when padding is required. Remove the tests
that ensured the input buffer was not copied entirely when padding was
added.
Signed-off-by: Loic Dachary <loic@dachary.org>
When coding chunks are allocated for jerasure, their address must be
aligned to page boundaries. The requirement is actually to be aligned on
a long long boundary but bufferlist do not allow for fine tuning of the
alignment.
If padding is necessary because the total size of the data to be encoded
is not a multiple of the alignment requirements as returned by
get_alignment(), the buffer is not only padded but also rebuilt using
rebuild_page_aligned() to preserve the page alignment that is expected
of the input buffer.
The overhead of rebuilding the whole input buffer when padding is
necessary could be reduced by only reallocating one buffer for the last
data chunk, therefore reducing the amount of data being copied. However,
this optimization is not going to be used if the caller takes care of
the padding, which is likely to be the case most of the time.
Signed-off-by: Loic Dachary <loic@dachary.org>
mailmap: Adds Christophe Courtaut
git shortlog -nes
shows only one Christophe Courtaut proof that the .mailmap addition is working.
Reviewed-by: Loic Dachary <loic@dachary.org>
All tests in daemon_config use the global g_ceph_context
object. Introducing an expansion loop in it will impact all tests and
generate a very large output.
Remove the SubstitutionLoop test case which is also covered in
test/common/test_config.cc.
Signed-off-by: Loic Dachary <loic@dachary.org>
Fixes: #7083
This was broken when we fixed#6940. We use the same function to both
read the bucket policy and the object policy. However, each needed to be
treated differently. Restore old behavior for objects.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Part of the config.cc tests are in test/confutils.cc but they do not
cover meta variable expansion. Create unittest_config for config.{h,cc}
specific tests.
The test_md_config_t is made a friend of md_config_t to allow testing
private and protected methods.
test/cli/ceph-conf/show-config-value.t is used to check that the human
readable message message shows as expected when there is an expansion
loop.
Signed-off-by: Loic Dachary <loic@dachary.org>
Using a recursive implementation of variable expansions make it easier
to protect against loops and provide human readable messages when they
happen.
It also enables one variable to be substituted multiple times in the
same configuration option instead of just once because it is confused
with a variable expansion loop.
http://tracker.ceph.com/issues/7103fixes: #7103
Signed-off-by: Loic Dachary <loic@dachary.org>
When choosing a random OSD to send a message to, verify not only that
the OSD id is up but that the session is for the same instance of that OSD
by checking that the address matches.
Fixes: #7093
Backport: emperor, dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
The mon may occasionally send OSDMap messages to random OSDs, but is not
very descriminating in that we may not have authenticated yet. Ignore any
messages if that is the case; we will reqeust whatever we need during the
BOOTING state.
Fixes: #7093
Signed-off-by: Sage Weil <sage@inktank.com>
Adds a class that executes registered callbacks in its destructor. Since
static duration objects have their destructors called when returning
from main or calling exit then this can be used as a replacement for
on_exit.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
How to make this portable:
- MAP_ANONYMOUS -> MAP_ANON (OSX)
- sem_init (anonymous semaphore) needs to be replaced by named
semaphores using sem_open/sem_close. Use a memory address of the sem_t
variable to hack anonymous semaphore behavior.
- sem_getvalue isn't supported on OSX. it is used here to do
sem_wait/sem_post to bring a semaphore back to a specific value. to get
around this we may need to restructure the test so that the semaphore
can be destroyed and re-initialized rather than inspected as its
currently being done.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
On OSX (and currently any platform missing the MSG_MORE
macro) the MSG_MORE optimization is disabled. The MSG_NOSIGNAL flag is
available on OSX but is called SO_NOSIGPIPE and must be set via
setsockopt.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>