rgw: fix reading bucket policy in RGWBucket::get_policy()

Fixes: 6940
Backport: dumpling, emperor

We changed the way we keep the bucket policy, and we shouldn't try to
access the bucket object directly. This had changed when we added the
bucket instance object around dumpling.

Reported-by: Gao, Wei M <wei.m.gao@intel.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
osd: include peer_info in pg query

This can be very useful when diagnosing peering problems.

Signed-off-by: Sage Weil <sage@inktank.com>
osd/PG: move some pg stat update into a helper

When we publish PG stats to the monitor, we fill in a bunch of fields
with information about degraded objects, scrub timestamps, and other
sundry.

Move this into a helper that we will re-use shortly.

Note that we do *not* move anything that is semantically related to
the stats being published (like the 'reported' field).

Signed-off-by: Sage Weil <sage@inktank.com>
osd/ReplicatedPG: update pg stat fields when they are queried

When we query a PG, fill in (most of) the same fields that get
populated when the stats are reported to the mon.

Fixes: #6988
Signed-off-by: Sage Weil <sage@inktank.com>
Merge pull request #908 from ceph/wip-6940

rgw: fix reading bucket policy in RGWBucket::get_policy()

Reviewed-by: Sage Weil <sage@inktank.com>
make: restrict use of --as-needed to Linux

This should really be checked in configure.ac in the future.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
make: add top-level libcommon dependency

On OSX there is consistently a problem with resolving pipe_cloexec and other
symbols through indirect libtool dependencies (below libglobal has a dependency
on libcommon). This makes the dependency top-level for most executables.

  CXXLD    ceph_test_timers
Undefined symbols for architecture x86_64:
  "_pipe_cloexec", referenced from:
      AdminSocket::create_shutdown_pipe(int*, int*) in libglobal.a(admin_socket.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
json_spirit: don't build json_spirit_value.cpp

This file just includes the header that is full of templates and
typedefs, so the resulting object file has no symbols in it and
generates warnings.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
make: avoid symbol exporting for C++ libs on non-Linux

This removes export-symbol-regex for installed libraries with C++
interfaces on non-Linux where the hidden symbols are not resolved. This
is a temporary fix.

See ceph-devel topic "Shared library symbol visibility" for discussion
about a perm solution.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
erasure: add dummy symbol to avoid warnings

Empty object files generate warning.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
test_cls_rbd: avoid shift overflow

warning: signed shift result (0x500000000) requires 36 bits to represent

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
test_cls_rbd: avoid warning -Wno-unnamed-template-args

According to this https://code.google.com/p/googletest/source/detail?r=446
the use of unnamed types (in this case the protection flag enums from
librbd/parent_types.h) as template parameters (in this case the gtest
macros) is not valid C++ pre C++0x.

As suggested, converting the enum into an int with integral promotion
via unary plus operator solves the problem.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
make: conditionally build filestore backends

Each of btrfs and zfs backends are wrapped in if __linux__ and if
WITH_ZFS, respectively, resulting in empty object files and the
associated warnings. This builds them under the same conditions.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
v0.74
rados: allow listomapvals to list all k/v pairs

Current code only lists first 512 k/v pairs.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
qa: test rados listomapvals with >512 keys

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
msgr: fix rebind() race
stop the accepter and mark all pipes down before rebind to avoid race

Fixes: #6992

Signed-off-by: Xihui He xihuihe@gmail.com
osd_types: add missing osd op flags

These were accidentally removed in:
85282319ee3e0d535d1ffc0a6ae8f763a41628b7

Fixes: #7067
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Merge pull request #1023 from ceph/port/misc

misc portability patches

Reviewed-by: Sage Weil <sage@inktank.com>
Fix typos in erasure code documents

Signed-off-by: Kun Huang <academicgareth@gmail.com>