osd: rename IGNORE_OVERLAY -> IGNORE_CACHE

This is about skipping cache logic, not the tier pool overlay property.

Signed-off-by: Sage Weil <sage@inktank.com>
osdc/Objecter: add CEPH_OSD_FLAG_IGNORE_OVERLAY flag

If the flag is set, send the op to the pool specified and ignore the
overlay.  Note that this obsoletes the global Objecter flag.

It also makes these EINVAL correctly:

  rados -p base cache-flush
  rados -p base cache-evict

Signed-off-by: Sage Weil <sage@inktank.com>
osd/ReplicatedPG: use IGNORE_OVERLAY flag for copy-from

No need to use the Objecter-wide setting now.

Signed-off-by: Sage Weil <sage@inktank.com>
osdc/Objecter: remove honor_cache_redirects global flag

We can do this on a per-op basic with CEPH_OSD_FLAG_IGNORE_OVERLAY.

Signed-off-by: Sage Weil <sage@inktank.com>
librados: seek during object iteration

Add ability to reset iterator to a specific hash position.  For now, we
just truncate this to the current PG.  In the future, this may be more
precise.

Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
ceph_test_rados: fix CopyFromOp locking

Signed-off-by: Sage Weil <sage@inktank.com>
ceph_test_rados: test is_dirty, undirty

Signed-off-by: Sage Weil <sage@inktank.com>
ceph_test_rados: debug: include exists|dne in update_object_version

Signed-off-by: Sage Weil <sage@inktank.com>
osd/ReplicatedPG: rename invalidate_forward

Signed-off-by: Sage Weil <sage@inktank.com>
osd/ReplicatedPG: debug: improve maybe_handle_cache() handling

Signed-off-by: Sage Weil <sage@inktank.com>
ceph_test_rados_api_tier: test undirty on non-existent object

Signed-off-by: Sage Weil <sage@inktank.com>
osd/osd_types: fix operator<< on copy-get operation

This was missed in 15c8267e34aaba7a6d1d316b22519982a997f5a0.

Signed-off-by: Sage Weil <sage@inktank.com>
osd/ReplicatedPG: fix promote: set oi.size

Signed-off-by: Sage Weil <sage@inktank.com>
librados, osd: add flags to COPY_FROM

If we initiate a COPY_FROM as part of a FLUSH operation, we will need to
set a flag so that the read-side of the copy and join the existing
in-progress operation without taknig additional locks.

Similarly, we need to pass flags from the client indicating whether we
should ignore overlay or cache logic while performing the copy.  These are
used by the promote and flush logic.

Note that none of these flags are exposed through librados (at least not
at this time).

Signed-off-by: Sage Weil <sage@inktank.com>
osd/ReplicatedPG: implement cache-flush, cache-try-flush

Implement a rados operation that will flush a dirty object in the cache
tier by writing it back to the base tier.

Signed-off-by: Sage Weil <sage@inktank.com>
rados: add cache-flush, cache-evict, cache-flush-evict-all commands

Signed-off-by: Sage Weil <sage@inktank.com>
qa/workunits/rados: test cache-{flush,evict,flush-evict-all}

Signed-off-by: Sage Weil <sage@inktank.com>
qa/workunits/rados: rename cache pool tests

Signed-off-by: Sage Weil <sage@inktank.com>
qa/workunits/rados/test_cache_pool.sh: fixes

Signed-off-by: Sage Weil <sage@inktank.com>
vstart.sh: --cache <pool> to set up pool cache(s) on startup

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