Objecter: init with a constant of the correct type

Just a tiny cleanup.

Signed-off-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>
doc/release-notes: fix attributions for 8702 fix

Oops!

Signed-off-by: Sage Weil <sage@redhat.com>
mailmap: update email address

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Merge pull request #2625 from ceph/wip-ysw-mailmap

mailmap: update email address

Reviewed-by: Loic Dachary <loic-201408@dachary.org>
tools: rados put /dev/null should write() and not create()

In the rados.cc special case to handle put an empty objects, use
write_full() instead of create().

A special case was introduced 6843a0b81f10125842c90bc63eccc4fd873b58f2
to create() an object if the rados put file is empty. Prior to this fix
an attempt to rados put an empty file was a noop. The problem with this
fix is that it is not idempotent. rados put an empty file twice would
fail the second time and rados put a file with one byte would succeed as
expected.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>