ReplicatedPG,PG: move duplicate FlushedEvt logic info on_flushed()

Signed-off-by: Samuel Just <sam.just@inktank.com>
PG,ReplicatedPG: allow multiple flushes to be in progress

Shortly, we won't know precisely when to flush, so Strays
may need to flush twice.

Signed-off-by: Samuel Just <sam.just@inktank.com>
PG: call start_flush in Active() instead of using do_pending_flush()

This way, we don't block an OpWQ thread while waiting on the filestore.

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG/PGBackend: block all ops other than Pull prior to active

Previously, it was guarranteed that prior to activation, flushed would
be false on a replica.  Now, there may be a period where flushed is true
due to the flush in Stray completing prior to activation and flushed
being false again.  This is necessary since shortly it won't be possible
to determine from the osdmap whether a stray will be activated in a
particular interval.

Signed-off-by: Samuel Just <sam.just@inktank.com>
PG: don't requeue waiting_for_active unless flushed and active

Signed-off-by: Samuel Just <sam.just@inktank.com>
PG: remove unused Peering::flushed

This has been unused for quite some time!

Signed-off-by: Samuel Just <sam.just@inktank.com>
osd: Simple dout() fix

Signed-off-by: David Zafman <david.zafman@inktank.com>
osd: Backfill peers should not be included in the acting set

Create actingbackfill in choose_acting()
Use first backfill target as previously
Add asserts to catch inappropriate use of actingbackfill
Use is_acting() in proc_replica_info() because this is before actingbackfill set
Remove backfill_targets from stray_set to prevent purge_strays from removing collection
Can't check is_replica() anymore for backfill operations since a backfill isn't
a replica due to acting set change.

fixes: #5855

Signed-off-by: David Zafman <david.zafman@inktank.com>
doc: Clarification of terms.

fixes: #6749

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
doc: Took out "future" reference to namespaces.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
doc: PG splitting added to docs.

fixes: #6727

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
doc: Added commentary to configure pg defaults. Clarified size commentary.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
Merge branch 'master' of https://github.com/ceph/ceph
doc: Fixed instruction.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
doc: Clarified description on scrub load threshold.

fixes: #6735

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
buffer: abstract raw data related methods

Create a virtual function that returns the raw data instead of
accessing it directly, so raw buffers backed by pipes can be used as
buffer::ptrs. Make raw::is_page_aligned() virtual so it will not need
to look at the raw data for a pipe-based buffer.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
buffer: remove unused raw::length() method

This was accidentally introduced in
0c23a5624a80903fba7e635e8c44f38a79caf223

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
safe_io: add functions for handling splice

Like the other functions, these don't handle non-blocking I/O.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
buffer: add an exception with an error code

This allows e.g. raw buffer constructors to provide more specific
information about what failed, as well as a useful error string
automatically.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
buffer: create raw pipe-based buffer

This uses a pipe to reference kernel memory so we can use splice(2) to
avoid extra data copies. Take an fd in the factory to create it, since
that's the only way to use it efficiently, which is its whole purpose.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>