config: expand metavariables for --show-config, --show-config-value

Signed-off-by: Sage Weil <sage@newdream.net>
dencoder, rgw: make ceph-dencoder load much faster

by avoiding linking with unneeded shared objects.

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
FileStore: do not check dbobjectmap without option set

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
v0.44.2
encoding: use iterator to copy_in encoded length

This gives us a pointer to the position into the list where the final
length value will be copied.  Previously we used bl.copy_in(), which takes
a byte offset and needs iterator over the bufferlist to seek to the
correct position, resulting in O(n^2) encoding time for large structures.

Fixes: #2161
Reported-by: Jim Schutt <jaschut@sandia.gov>
Diagnosed-by: Ake van der Meer <petrabbit@xs4all.nl>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
OSD: use per-pg temp collections, bug #2255

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
librados: unconditonally associate IoCtxImpl with AioCompletionImpl

We were only setting the pointer if we were on the aio_write_list.  Set
this pointer for any aio.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
librados: do aio callbacks in async thread

Call user completions in an async thread.  This allows callers to call back
into librados from the callback, and allows them to take locks in their
callbacks that they hold when queuing requests (making their life much
easier).

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
ObjectCacher: check for read/write errors

The objecter doesn't fix every error for us.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Filer: make file_to_extents static

Now the ObjectCacher has no need for a Filer instance (not that
it had a good reason for one before).

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
ObjectCacher: remove dependency on Objecter

Abstract out how writeback is done with a WritebackHandler object.
For RBD caching, this will be done by librados, but the Client uses
the Objecter directly.

This also requires different locks, since librbd does not have access
to the lock the underlying Objecter uses. Thus, both lock and the
writeback handler are parameters of the ObjectCacher constructor.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
librbd: remove writeback window

This is superseded by a full-fledged writeback cache.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
librbd: allow writeback caching

This uses the existing infrastructure of ObjectCacher for
buffer management and expiry.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
librbd: check for writes to snapshots

librados does this for us normally, but caching does not check for this.
We might as well check early to avoid scheduling a bunch of aios anyway.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
librbd: fix bytes read accounting in read_iterate

ObjectCacher will never do short reads, and always returns 0.
librados may do short reads at the end of an object.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
librbd: flush cache before creating a snapshot

This is a temporary workaround until the ObjectCacher
is smarter about snapshots.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
ObjectCacher: add some asserts about when the lock is held

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Remove unused Completion.h header

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
ObjectCacher: remove redundant 'public:'

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
ObjectCacher: remove unused/unimplemented methods

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