ECMsgTypes::ECSubWrite: fix at_version indentation

Signed-off-by: Samuel Just <sam.just@inktank.com>
encoding: use unqualified name for encode/decode in boost::optional encoding

Signed-off-by: Samuel Just <sam.just@inktank.com>
osd/: propogate hit_set history with repop

We don't actually send the whole info on each repop, just the log
entries, updated stats, and a few other bits.  For hit_set ops, we need
to also communicate the new hit_set history status atomically with the
log entries and the transaction.  Thus, we add a channel for an optional
pg_hit_set_history_t field in PGBackend::submit_transaction interface
and associated messages and implementations to update the hit_set info
field along with the log entries.

This also means that hit_set_(persist|trim) update an
updated_hit_set_history field on the OpContext instead of directly
modifying the info field.

Fixes: #8124
Signed-off-by: Samuel Just <sam.just@inktank.com>
PG,PGLog: update hit_set during peering

Fixes: #8124
Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG::agent_load_hit_sets: take ondisk_read_lock

Otherwise, the hit_set might be not yet written due to a recently
completed recovery.

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG: do not use shard for hit_set object names

Signed-off-by: Samuel Just <sam.just@inktank.com>
qa/workunits/cephtool/test.sh: make set pg_num test non-racy

Loop while the pool is creating.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Merge pull request #1705 from ceph/wip-8124

Wip 8124

Reviewed-by: Sage Weil <sage@inktank.com>
ReplicatedPG,rados: add CEPH_OSD_[COPY_FROM]_MAP_SNAP_TO_CLONE

When promoting a clone, we want to use the provided snapid to specify
specify the clone id directly.

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG: do not create whiteout clones

First, make_writeable treats whiteout heads like snapdir for
cloning purposes.  Second, to ensure that we send the correct
deletes on flush to the backing pool, we instead use oi.snaps
on any clone we are flushing to infer the snaps during which
head did not exist and send a delete as appropriate prior to
the copy_from.

Normally, we'd have a problem if the delete and the copy_from
completed, but an interval change intervened before the dirty
flag was cleared since we'd end up re-deleting the object.
To avoid that, we use the CEPH_OSD_FLAG_ORDERSNAP flag.

Additionally, we will use the correct snap_seq on the delete
or flush as appropriate to ensure that the previous clone
gets created with the same clone id as in the cache pool.

Fixes: #7942
Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG: if we get ENOENT on clone, remove clone from snapset

Fixes: #7916
Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG: in trim, grab w locks on obc and snapset_obc

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG::do_op: check for blocked snapset obj

Otherwise, we might use an invalid snapset in find_object_context.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Merge pull request #1703 from ceph/wip-7942

Wip 7942

Reviewed-by: Sage Weil <sage@inktank.com>
PG::PriorSet: consider lost osds in up_now for pcontdec

Otherwise, the pg will remain down even as osds are marked lost.

Signed-off-by: Samuel Just <sam.just@inktank.com>
doc: Fixed syntax to include 'pool'.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
qa/workunit/rbd/copy.sh: do not delete/recreate rbd pool

Among other things, it breaks when tiering is enabled.

Signed-off-by: Sage Weil <sage@inktank.com>
qa/workunit/rbd/import_export.sh: skip list-objects tests with tiering

Listing objects isn't reliable with cache pools; skip that part of the
test if we see that rbd has tiering enabled.

Signed-off-by: Sage Weil <sage@inktank.com>
Merge pull request #1707 from ceph/wip-rbd-test

rbd: fix tests for cache pools

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
doc/release-notes: v0.80

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