osd/: move split_list and split_request into OSD

Signed-off-by: Samuel Just <sam.just@inktank.com>
rgw: reduce calls to rgw_obj.set_obj()

default manifest iterator construction did unneeded init of rgw_obj.
Also add a smarter copy constructor to RGWObjState that does not copy
manifest if not needed.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
OSD: move waiting_for_pg into Session

This way, we can handle pg splits atomically with ms_fast_dispatch.

Signed-off-by: Samuel Just <sam.just@inktank.com>
qa: add script to test krbd setting ro/rw ioctl

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
erasure-code: remove jerasure internals dependencies

Use the galois_init_default_field() function instead of implementing it
in the init function of the ErasureCodeJerasure plugin. It removes
dependencies to internal variables of the jerasure library that are
subject to change because they are not part of the published API.

http://tracker.ceph.com/issues/8071 Fixes: #8071

Signed-off-by: Loic Dachary <loic@dachary.org>
Make KeyValueStore not use expected_write_size

expected_write_size in set_alloc_hint isn't the mean of name, now it's just the
size of object. It's not suitable for KeyValueStore to set strip size.

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
vstart.sh: rename conf variable to conf_fn

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
vstart.sh: echo CEPH_{CONF,KEYRING} exports if necessary

If CEPH_DIR is not PWD, echo export statements for CEPH_{CONF,KEYRING}.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
ceph_test_rados_api_tier: disable LibRadosTierECPP::HitSetWrite

Disable this test until hitget-get reliably works on EC pools (currently
it does not, and this test usually passes only because we get the in-memory
HitSet).

Signed-off-by: Sage Weil <sage@inktank.com>
Merge pull request #1971 from ceph/wip-ec-hitset

ceph_test_rados_api_tier: disable LibRadosTierECPP::HitSetWrite

Reviewed-by: Loic Dachary <loic@dachary.org>
mon/OSDMonitor: make down osd count sensible

We currently log something like

 1/10 in osds are down

in the health warning when there are down OSDs, but this is based on a
comparison of the number of up vs the number of in osds, and makes no sense
when there are up osds that are not in.

Instead, count only the number OSDs that are both down and in (relative to
the total number of OSDs in) and warn about that.  This means that, if a
disk fails, and we mark it out, and the cluster fully repairs itself, it
will go back to a HEALTH_OK state.

I think that is a good thing, and certainly preferable to the current
nonsense.  If we want to distinguish between down+out OSDs that were failed
vs those that have been "acknowledged" by an admin to be dead, we will
need to add some additional state (possibly reusing the AUTOOUT flag?), but
that will require more discussion.

Backport: firefly (maybe)
Signed-off-by: Sage Weil <sage@inktank.com>
mon: fix typos, punctuation for mon disk space warning(s)

Backport: firefly
Signed-off-by: Sage Weil <sage@inktank.com>
mon: refactor check_health()

Refactor the get_health() methods to always take both a summary and detail.
Eliminate the return value and pull that directly from the summary, as we
already do with the PaxosServices.

Signed-off-by: Sage Weil <sage@inktank.com>
mon: ensure HealthService warning(s) include a summary

The low disk space check would change our status to HEALTH_WARN and include
a detail message, but no summary.  We need both.

Backport: firefly
Signed-off-by: Sage Weil <sage@inktank.com>
mon: Monitor: rework tick() so we don't calculate the same thing over and again

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: Monitor: complex code deduplication algorithm applied to tick()

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
osd: fix word sizes in MBackfillReserve

Fix these fields to 32 bits.

Signed-off-by: Sage Weil <sage@inktank.com>
common/AsyncReserver: add a min_priority knob

To do reserve items that are < the min priority.  Default to 0.

Signed-off-by: Sage Weil <sage@inktank.com>
osd: add osd_min_recovery_priority tunable

Add a tunable to control the minimum priority recovery item that we will
grant a reservation for.  The priority is lower for less-degraded PGs.
This allows a saavy admin to only backfill the least-redundant PGs.

Signed-off-by: Sage Weil <sage@inktank.com>
osd: prioritize backfill based on *how* degraded

Instead of prioritizing all degraded PGs equally, prioritize those that
have the fewest acting members (the most degraded).

Drop the priority constants.

Define our max priority independently of AsyncReserver, which uses a host
unsigned.

Signed-off-by: Sage Weil <sage@inktank.com>