osd: drop dead shutdown message handler

There is no code anywhere in the code base that generates a MSG_SHUTDOWN.
Kill this.  The get_priv() logic here looks pretty dodgey anyway.

Signed-off-by: Sage Weil <sage@redhat.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
osd/ReplicatedPG: handle sessionless op con in do_osd_op_effects

Signed-off-by: Sage Weil <sage@redhat.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
osd/Watch: handle con without sessions

Signed-off-by: Sage Weil <sage@redhat.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Pipe: stop delayed delivery fast_dispatch in stop_and_wait()

If we don't, we can keep fast_dispatching messages after a Pipe has been
mark_down()ed. That breaks things right now.

Fixes: #9295

Signed-off-by: Greg Farnum <greg@inktank.com>
Objecter: disable fast dispatch of CEPH_MSG_OSD_OPREPLY messages

If they fast_dispatch they can deadlock right now. We'll need to change
the semantics around mark_down() or around the Objecter's locking to
fix it.

Sort-of-
Fixes: #9462

Signed-off-by: Greg Farnum <greg@inktank.com>
For pgls OP, get/put budget on per list session basis, instead of per OP basis, which could lead to deadlock.

Signed-off-by: Guang Yang (yguang@yahoo-inc.com)
erasure-code: [ISA] modify get_alignment function to imply a platform/compiler independent alignment constraint of 32-byte aligned buffer addresses & length
erasure-code: isa uses per chunk alignment constraints

Copy code from the jerasure plugin to enforce alignment constraints per
chunk instead of using the total object size. It is simpler and reduces
the size of the chunks. See
https://github.com/ceph/ceph/commit/c7daaaf5e63d0bd1d444385e62611fe276f6ce29
for more information.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
erasure-code: do not use typed tests for isa

Because there only is one type.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
erasure-code: run isa tests via libtool and valgrind

Because running valgrind with no libtool does not test the binary but
the enclosing shell script.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
erasure-code: isa test compare chunks with memcmp instead of strncmp

Because they may contain null characters.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
erasure-code: isa encode tests adapted to per chunk alignment

The encode tests use the alignment constraints. It has been changed to
be aligned on a per chunk basis instead of computing a more expensive
object alignement constraint. The test function is modified to take the
change into account but the logic is otherwise unmodified.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
msg: allow calling dtor immediately after ctor

Asserting on reaper_stop only made sense if the
messenger had ever been started: as it stood,
one couldn't create and destroy a messenger
without also starting and stopping it.

Signed-off-by: John Spray <john.spray@redhat.com>
erasure-code: add test for isa chunk_size method

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
erasure-code: test isa encode/decode with various object sizes

Create an encode_decode() helper method to be called from the
encode_decode test function with various object size arguments. The
helper method is a copy/paste of the previous test that was using a
single object of a fixed size. The test is slightly adapted to
accommodate for different object sizes but the logic is not modified.

The object sizes being tested are chosen to be under the size of the
required size alignment or on multiple pages, size aligned or not.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
Merge pull request #2574 from ceph/wip-msgr-shutdown

msg: allow calling dtor immediately after ctor

Reviewed-by: Sage Weil <sage@redhat.com>
osdc/Objecter: only post_rx_buffer if no op timeout

If we post an rx buffer and there is a timeout, the revocation can happen
while the reader has consumed the buffers but before it has decoded and
constructed the message.  In particular, we calculate a crc32c over the
data portion of the message after we've taken the buffers and dropped the
lock.

Instead of fixing this race (for example, by reverifying rx_buffers under
the lock while calculating the crc.. bleh), just skip the rx buffer
optimization entirely when a timeout is present.

Note that this doesn't cover the op_cancel() paths, but none of those users
provide static buffers to read into.

Fixes: #9582
Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@redhat.com>
Merge pull request #2540 from ceph/wip-giant-messenger-fixes

giant messenger fixes

Reviewed-by: Sage Weil <sage@redhat.com>
osd: improve debug output for do_{notifies,queries,infos}

Hunting #9389

Signed-off-by: Sage Weil <sage@redhat.com>
Merge pull request #2531 from dachary/wip-9536-isa-alignment

erasure-code: isa plugin alignment fixes

Reviewed-by: Sage Weil <sage@redhat.com>