mon: add 'osd pool ls [detail]' command

This is much friendlier than

 ceph osd dump | grep ^pool

Signed-off-by: Sage Weil <sage@redhat.com>
Objecter: init with a constant of the correct type

Just a tiny cleanup.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
LogEntry.h: init LogEntry::prio in constructor

CID 1240202 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
 uninit_member: Non-static class member prio is not initialized
 in this constructor nor in any functions that it calls.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
SyntheticClient.cc: remove dead code

Fix for coverity issue:

const: At condition unsafe > 0, the value of unsafe must be equal to 0.
dead_error_condition: The condition unsafe > 0 cannot be true.

CID 716892 (#1 of 1): Logically dead code (DEADCODE)
dead_error_begin: Execution cannot reach this statement

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
client/SyntheticClient.cc: remove dead code

Fix for:

const: At condition do_sync, the value of do_sync must be equal to 0.
dead_error_condition: The condition do_sync cannot be true.
CID 716893 (#1 of 1): Logically dead code (DEADCODE)
dead_error_begin: Execution cannot reach this statement op.OSDOp()

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
test_librbd.cc: fix compiler warning

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Merge pull request #2452 from ceph/wip-pool-ls

mon: add 'osd pool ls [detail]' command

Reviewed-by: Joao Eduardo Luis <joao@redhat.com>
Merge pull request #2618 from ceph/wip-coverity-20141001

Fixes for Coverity issues

Reviewed-by: Sage Weil <sage@redhat.com>
librados: Add rados_pool_get_base_tier call

Fixes: #8188
Signed-off-by: Adam Crume <adamcrume@gmail.com>
Merge pull request #2552 from ceph/wip-8188

librados: Add rados_pool_get_tiers call

Reviewed-by: Sage Weil <sage@redhat.com>
librbd: Skip tier pools in list_children and snap_unprotect

Fixes: #8187
Signed-off-by: Adam Crume <adamcrume@gmail.com>
Merge pull request #2619 from ceph/wip-8187

librbd: Skip tier pools in list_children and snap_unprotect

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Objecter: check the 'initialized' atomic_t safely

shutdown() resets initialized to 0, but we can still receive messages
after this point, so fix message handlers to skip messages in this
case instead of asserting.

Also read initialized while holding Objecter::rwlock to avoid races
where e.g. handle_osd_map() checks initialized -> 1, continues,
shutdown() is called, sets initialized to 0, then handle_osd_map()
goes about its business and calls op_submit(), which would fail the
assert(initialized.read()) check. Similar races existed in other
message handlers which change Objecter state.

The Objecter is not destroyed until after its Messenger in
the MDS, OSD, and librados, so this should be safe.

Fixes: #9617
Backport: giant
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
test_librbd.cc: fix compiler warning, cast to size_t

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
BtrfsFileStoreBackend.cc: fix string overflow

Use strncpy() instead of strcpy and make sure the result
is '\0' terminated.

Fix for:

CID 1063700 (#1 of 1): Copy into fixed size buffer (STRING_OVERFLOW)
 fixed_size_dest: You might overrun the 4088 byte fixed-size string
 vol_args.name by copying the return value of c_str without checking
 the length.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
qa: fix osd pool ls invalid test

expect_false does not extend past the pipe and fails because the command
succeeds

introduced in f05c977bbcd310a83e6df03344a72d4cc06e1cc3

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
Merge pull request #2621 from ceph/wip-objecter-shutdown

Fix Objecter shutdown races with message handling

Reviewed-by: Sage Weil <sage@redhat.com>
Merge pull request #2622 from dachary/wip-osd-pool-ls

qa: fix osd pool ls invalid test
Merge pull request #2623 from ceph/wip-coverity-20141002

build and coverity fixes

Reviewed-by: Sage Weil <sage@redhat.com>
doc/release-notes: v0.80.6

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