osd: do not send peering messages during init

Do not send any peering messages while we are still working our way
through init().

Fixes: #7093
Signed-off-by: Sage Weil <sage@inktank.com>
osd: ignore OSDMap messages while we are initializing

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>
mon: only send messages to current OSDs

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>
EC-JERASURE: rewrite region-xor function using vector operations to get ~ x1.5 speedups for erasure code and guarantee proper 64-bit/128-bit buffer alignment
erasure-code: ensure that coding chunks are page aligned

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>
erasure-code: relax zero copy requirements in tests

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>
doc: Fixed hyperlink.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
doc: Updated for hostname -s and resolving to non-loopback IP address.

fixes: #6234

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
Merge pull request #1045 from ceph/wip-7093

fix for #7093

Reviewed-by: Samuel Just <sam.just@inktank.com>
Merge pull request #1057 from dachary/wip-buffer-aligned

erasure-code: ensure that coding chunks are page aligned

Reviewed-by: Andreas Peters <andreas.joachim.peters@cern.ch>
Merge pull request #1056 from apeters1971/wip-jerasure-vectorop

EC-JERASURE: rewrite region-xor function using vector operations 

Reviewed-by: Loic Dachary <loic@dachary.org>
mailmap: add Sage Weil fixes for Reviewed-by:

Signed-off-by: Loic Dachary <loic@dachary.org>
mailmap: add Yehuda Sadeh fixes for Reviewed-by:

Signed-off-by: Loic Dachary <loic@dachary.org>
mailmap: add Greg Farnum fixes for Reviewed-by:

Signed-off-by: Loic Dachary <loic@dachary.org>
mailmap: add Samuel Just fixes for Reviewed-by:

Signed-off-by: Loic Dachary <loic@dachary.org>
mailmap: add Dan Mick fixes for Reviewed-by:

Signed-off-by: Loic Dachary <loic@dachary.org>
mailmap: add João Eduardo Luís fixes for Reviewed-by:

Signed-off-by: Loic Dachary <loic@dachary.org>
mailmap: add Noah Watkins fixes for Reviewed-by:

Also acknowledge noah.watkins@inktank.com as the primary email.

Signed-off-by: Loic Dachary <loic@dachary.org>
mailmap: add Gary Lowell fixes for Reviewed-by:

Signed-off-by: Loic Dachary <loic@dachary.org>
mailmap: add Loic Dachary fixes for Reviewed-by:

Signed-off-by: Loic Dachary <loic@dachary.org>