ceph.in: handle DYLD_LIBRARY_PATH on OS X

On OS X, the environment variable to override
to .libs is DYLD_LIBRARY_PATH instead of
LD_LIBRARY_PATH.

Signed-off-by: John Spray <john.spray@redhat.com>
common/Thread: add missing #include for pid_t

On linux this worked by side effect from
pthread.h, but POSIX header for pid_t is
sys/types.h -- this is needed on OS X.

Signed-off-by: John Spray <john.spray@redhat.com>
os/FileStore: move ZFS_SUPER_MAGIC in linux ifdef

The __SWORD_TYPE for this line is linux-specific.

Signed-off-by: John Spray <john.spray@redhat.com>
client: handle missing O_RSYNC constant

Although this is part of POSIX, it's missing on
OS X.  #define it to zero in this case so that checks
for the flag will always be false.

Signed-off-by: John Spray <john.spray@redhat.com>
common: move #include syscall into ifndef DARWIN

Signed-off-by: John Spray <john.spray@redhat.com>
os/FileStore: put SUPER usage in ifdef __linux__

This is an update to take account of 9312c5e wherein
the FS_* enum was replaced by direct use of SUPER_MAGIC
macros.

Signed-off-by: John Spray <john.spray@redhat.com>
mds: avoid comparing MutationRef with 0

LLVM on OS X considers this == operator with an int
ambiguous: compare with an explicit MutationRef()
instead.

Signed-off-by: John Spray <john.spray@redhat.com>
Support for READFORWARD in the caching tier

READFORWARD caching policy uses writeback for writes
and redirects reads to the back end starage tier.

Signed-off-by: Luis Pabón <lpabon@redhat.com>
Work around an apparent binding bug (GCC 4.8).

A reference to h->seq passed to std::pair ostensibly could not bind
because the header structure is packed.  At first this looked like
a more general unaligned access problem, but the only location the
compiler rejects is a false positive.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Convert ConnectionRef explicitly to bool.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Add required spacing after string literals (PRIu64).

The common formatting for these 64bit types is not C++ 2011
clean.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>

Conflicts:
	src/common/perf_counters.cc
Remove some not-resolving make_pair() invocations.

There's nothing wrong with make_pair(), but there is some type
resolution issue in these instances, at least with GCC 4.8.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
test: fix make_pair() for c++11

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Add random_cache.hpp to Makefile.am

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
nuke dlist

No users.

Signed-off-by: Sage Weil <sage@inktank.com>
os: add prototype KineticStore

Implement the KeyValueDB interface using libkinetic_client,
and allow it to be configured as the backend for the KeyValueStore,
running the entire OSD on it.

This prototype implementation has no transaction safety, and is
only suitable as a proof of concept. Since the libkinetic_client
API does not provide reverse iteration over keys without also reading
the value off disk, it implements iterators in a very slow but correct way.
These are used heavily by the KeyValueDB callers, so this is a bottleneck
in performance.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
mon: OSDMonitor: limit tier-specific pool set/get on non-tier pools

Fixes: 8696

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
osd: pg_pool_t: clear tunables on clear_tier()

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: OSDMonitor: be scary about inconsistent pool tier ids

We may not crash your cluster, but you'll know that this is not something
that should have happened.  Big letters makes it obvious.  We'd make them
red too if we bothered to look for the ANSI code.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
qa/workunits: cephtool: split get/set on tier pools from get/set tests

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>