common/Finisher: add queue(list<Context*>&)

Signed-off-by: Samuel Just <sam.just@inktank.com>
osd_types: add pg_log_t::rollback_info_trimmed_to

Signed-off-by: Samuel Just <sam.just@inktank.com>
PGLog: initialize complete_to

Signed-off-by: Samuel Just <sam.just@inktank.com>
os/: add async flush_commit() method to Sequencer and implementations

Signed-off-by: Samuel Just <sam.just@inktank.com>
PG: add machinery to temporarily buffer outgoing recovery messages

Signed-off-by: Samuel Just <sam.just@inktank.com>
PG: block outgoing peering messages until the last interval is durable

Signed-off-by: Samuel Just <sam.just@inktank.com>
PGLog: fix logging whitespace in trim

Signed-off-by: Samuel Just <sam.just@inktank.com>
PGLog: add rollback_info_trimmed_to_riter to IndexedLog and use in PG

Signed-off-by: Samuel Just <sam.just@inktank.com>
osd/: plumb rollback_trim_to through interfaces and messages

We simply trim the roll back info up to min_last_complete_ondisk
since we cannot correctly rollback past that point anyway!

ReplicatedPG
-> PGBackend::submit_transaction
-> Backend messages
-> PGBackend::Listener::log_operation
-> append_log

Signed-off-by: Samuel Just <sam.just@inktank.com>
osd/: in scrub, check for and remove obsolete rollback objs

Signed-off-by: Samuel Just <sam.just@inktank.com>
osd: allow greedy get_write() for ObjectContext locks

There are several lockers that need to take a write lock
because there is an operation that is already in progress and
know it is safe to do so.  In particular, they need to skip
the starvation checks (op waiters, backfill waiting).

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 09626501d7a0ff964027fd7a534465b76bad23cb)
osd/ReplicatedPG: greedily take write_lock for copyfrom finish, snapdir

In the cases where we are taking a write lock and are careful
enough that we know we should succeed (i.e, we assert(got)),
use the get_write_greedy() variant that skips the checks for
waiters (be they ops or backfill) that are normally necessary
to avoid starvation.  We don't care about staration here
because our op is already in-progress and can't easily be
aborted, and new ops won't start because they do make those
checks.

Fixes: #8889
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 6fe27823b8459271bf0c0e807493bb7cf1e4559b)
osd/ReplicatedPG: debug obc locks

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 356af4bf46d6387e2f1a59646548f9a77e49e5f8)
mon: OSDMonitor: return immediately if 'osd tier cache-mode' is a no-op

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
(cherry picked from commit d01aa5bff30441eec1ffaa3e59a21187f8478475)
mon: OSDMonitor: disallow nonsensical cache-mode transitions

Fixes: 8155

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
(cherry picked from commit fd970bbc95d89bf66c9551feca17ac0afbf4d1e2)
mon/OSDMonitor: improve no-op cache_mode set check

If we have a pending pool value but the cache_mode hasn't changed, this is
still a no-op (and we don't need to block).

Backport: firefly
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 67d13d76f5692fa20649ea877f254c34094c11f6)
mon: OSDMonitor: limit tier-specific pool set/get on non-tier pools

Fixes: 8696

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
(cherry picked from commit f131dfbaedf6f451572e7aa3a83f653912122953)
osd: pg_pool_t: clear tunables on clear_tier()

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
(cherry picked from commit 64bdf6c92bc44adad5a49b9dc4f674789cee80b0)
mon: OSDMonitor: be scary about inconsistent pool tier ids

We may not crash your cluster, but you'll know that this is not something
that should have happened.  Big letters makes it obvious.  We'd make them
red too if we bothered to look for the ANSI code.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
(cherry picked from commit 8e5a8daf98052954f3880d2d3516841b5062466b)
qa/workunits/cephtool: test setting options using SI units

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
(cherry picked from commit 38405d3554dfb0caf2b0a2c010b95a61bdb99349)

Conflicts:
	qa/workunits/cephtool/test.sh