mon: add 'osd pool ls [detail]' command

This is much friendlier than

 ceph osd dump | grep ^pool

Signed-off-by: Sage Weil <sage@redhat.com>
KeyValueStore: Reduce redundancy set_header call

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
doc: Add keyvaluestore config description

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
KeyValueStore: Reduce redundant "make_pair"

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
FileStore: Race condition during object delete is fixed

There was a race condition (hence OSD crash) between lfn_unlink
and lfn_open. The reason was FDCache lookup was called without
taking index lock from lfn_open. Lookup will increase reference
count and thus Clear will not be able to delete those FDs. FDs
will be leaked. The assert within FDCache clear was hitting
because of this.

Fixes: #9480

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
client: trim unused inodes before reconnecting to recovering MDS

So the recovering MDS does not need to fetch these ununsed inodes during
cache rejoin. This may reduce MDS recovery time.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
rbd: Fix rbd diff for non-existent objects

Fixes: #6926
Signed-off-by: Adam Crume <adamcrume@gmail.com>
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>
os/FileJournal: do not request sync while shutting down

FileStore calls should_commit_now() to determine whether it should
loop and do a second sync (among other things).  During shutdown, this
can force us into a livelock: the journal is shutting down, but the
sync_entry loop never completes and repeatedly syncs because the
journal is full.  Since the journal is otherwise stopped, no expire
happens and we never become unfull, and we're stuck.

This seems to be triggered semi-reliably by the ceph_objectstore_tool
import function.

Fix by not requesting a sync while shutting down.

Fixes: #9545
Signed-off-by: Sage Weil <sage@redhat.com>
ceph_test_rados_api_tier: add EvictSnap2 test case

Verify an evict doesn't create a snapdir object.  Reproduces #8629

Signed-off-by: Sage Weil <sage@redhat.com>
osd/ReplicatedPG: do not clone or preserve snapdir on cache_evict

If we cache_evict a head in a cache pool, we need to prevent
make_writeable() from cloning the head and finish_ctx() from
preserving the snapdir object.

Fixes: #8629
Backport: firefly
Signed-off-by: Sage Weil <sage@redhat.com>
PG: check full ratio again post-reservation

Otherwise, we might queue 30 pgs for backfill at 0.80 fullness
and then never check again filling the osd after pg 11.

Fixes: #9574
Backport: dumpling, firefly, giant
Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG: clean out completed trimmed objects as we go

Also, explicitely maintain a max number of concurrently trimming
objects.

Fixes: 9113
Backport: dumpling, firefly, giant
Signed-off-by: Samuel Just <sam.just@inktank.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>