OSD: move the {boot,up,bind} epochs into OSDService

Provide interfaces around setting and retrieving them, instead of accessing
them directly with a lock.

Signed-off-by: Greg Farnum <greg@inktank.com>
OSD: move the peer_epoch and map sharing infrastructure into OSDService

None of this code requires OSD-internal data or acquring locks from
anybody else.

Signed-off-by: Greg Farnum <greg@inktank.com>
OSD: rename share_map_incoming and share_map_outgoing

share_map_incoming -> share_map
share_map_outgoing -> share_map_peer

Signed-off-by: Greg Farnum <greg@inktank.com>
SimpleMessenger: Don't grab the lock when sending messages if we don't have to

We'd like it if sending a message didn't require any global locks, but the
submit_message() function conditionally needs it in order to create new
Pipes. So:
1) When failing on a dud Pipe, verify that it's still the Pipe the Connection
is linked to; if not, try sending along the newly-linked Pipe.
2) Add an "already_locked" param to submit_message
3) Have the Connection-based interface set this param to false, and
the addr-based interface set it to true, reflecting whether they have
taken the SimpleMessenger::lock.
4) If we discover we need to reference global data structures in
submit_mesage:
  4a) if locked, do as we previously have
  4b) if not locked, take the lock and call into submit_message again.

The net effect of this is that in the typical case, the Connection-based
_send_message() function no longer acquires global locks, only per-Connection
ones. In the case where the Connection must recreate a Pipe, it falls back to
performing like the addr-based _send_message() does. In the case where
we are racing with somebody else recreating a Pipe(either us or the other
end), we may try twice but we will still only take per-Connection/Pipe locks,
which is a fair tradeoff for not taking the global lock.

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Merge pull request #1764 from eile/master

Fix installation into user home directory, broken by d3f0c0b

Reviewed-by: Sage Weil <sage@inktank.com>
client: check snap_caps in Incode::is_any_caps()

Fixes: #8290
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Merge pull request #1770 from ceph/wip-8290

client: check snap_caps in Incode::is_any_caps()

Reviewed-by: Sage Weil <sage@inktank.com>
Variable length array of std::strings (not legal in C++) changed to std::vector<std::string>

Signed-off-by: Daniel J. Hofmann <daniel@trvx.org>
doc: Added erasure coding and cache tiering notes. Special thanks to Loic Dachary.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
doc: Added sudo to setenforce. Restored merge artifact.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
doc: Fixed artifacts from merge.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
Revert "Fix installation into user home directory, broken by d3f0c0b"

This reverts commit 7539281037ce7a755ac8661ecb15aea32e5f79f6.

This breaks mount.fuse.ceph installation.
Merge pull request #1768 from daniel-j-h/code_quality

Variable length array of std::strings (not legal in C++) changed to std::vector<std::string>

Reviewed-by: Sage Weil <sage@inktank.com>
rgw: send user manifest header field

Fixes: #8170
Backport: firefly
If user manifest header exists (swift) send it as part of the object
header data.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Merge pull request #1653 from ceph/wip-7499

rgw, radosgw-admin: bucket link uses bucket instance id now

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Merge pull request #1748 from onlyjob/docs

sample.ceph.conf update:

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Merge pull request #1601 from ceph/wip-7576

osd: prevent pg map epochs from lagging too far behind

Reviewed-by: Samuel Just <sam.just@inktank.com>
osd/ReplicatedPG: fix whiteouts for other cache mode

We were special casing WRITEBACK mode for handling whiteouts; this needs to
also include the FORWARD and READONLY modes.  To avoid having to list
specific cache modes, though, just check != NONE.

Fixes: #8296
Backport: firefly
Signed-off-by: Sage Weil <sage@inktank.com>
ObjectCacher: remove useless assignment

left is not read after the break. Caught by clang-analyzer.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
librbd: check return value during snap_unprotect

This would only fail if the header object was corrupted, so it's
unlikely to occur in practice.

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