OSD::calc_priors_during: fix confusing for loop bracing (cosmetic)

Confusing lack of braces is confusing.

Signed-off-by: Samuel Just <sam.just@inktank.com>
OSD::calc_priors_during: handle CRUSH_ITEM_NONE correctly

Fixes: #8507
Signed-off-by: Samuel Just <sam.just@inktank.com>
ceph: output prompt only if stdin is tty

In loop mode, output prompt only if stdin is tty, i.e. if we are
interactive.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
  Fix EINVAL err when use "ceph tell osd.* bench"

  Signed-off-by: huangjun <hjwsm1989@gmail.com>
support dmcrypt partitions when activating

Signed-off-by: Alfredo Deza <alfredo.deza@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>
Merge pull request #1968 from ceph/wip-ceph-isatty

ceph: output prompt only if stdin is tty

Reviewed-by: Sage Weil <sage@inktank.com>
osd: introduce simple sleep during scrub

This option is similar to osd_snap_trim_sleep: simply inject an optional
sleep in the thread that is doing scrub work.  This is a very kludgey and
coarse knob for limiting the impact of scrub on the cluster, but can help
until we have a more robust and elegant solution.

Only sleep if we are in the NEW_CHUNK state to avoid delaying processing of
an in-progress chunk.  In this state nothing is blocked on anything.
Conveniently, chunky_scrub() requeues itself for each new chunk.

Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@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>
tests: remove spurious and harmless find command

Signed-off-by: Loic Dachary <loic@dachary.org>
enforce rados put aligment

Signed-off-by: Lluis Pamies-Juarez <lluis.pamies-juarez@hgst.com>
rgw-admin: Fix the 'show log' command

Fixes: #8553

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Signed-off-by: Sylvain Munaut <s.munaut@whatever-company.com>
ReplicatedPG: 'ajusted' typo

Signed-off-by: <Tyler Brekke> tyler.brekke@inktank.com
Merge pull request #1985 from concubidated/master

ReplicatedPG: Fix 'ajusted' typo

Reviewed-by: Sage Weil <sage@inktank.com>
Merge pull request #1986 from ceph/wip-scrub-sleep

osd: introduce simple sleep during scrub

Reviewed-by: Samuel Just <sam.just@inktank.com>
Merge pull request #1943 from athanatos/wip-8507

Wip 8507

Reviewed-by: Sage Weil <sage@inktank.com>