Sage Weil [Mon, 28 Nov 2016 19:26:51 +0000 (14:26 -0500)]
os/Transaction: add missing break
CID 1395137 (#1 of 1): Missing break in switch (MISSING_BREAK)
unterminated_case: The case for value ObjectStore::Transaction::OP_TRY_RENAME is not terminated by a 'break' statement.
Sage Weil [Mon, 28 Nov 2016 19:26:21 +0000 (14:26 -0500)]
os/ObjectStore: pass by ref to clone
CID 1395658 (#1 of 1): Big parameter passed by value (PASS_BY_VALUE)
pass_by_value: Passing parameter noid of type ghobject_t (size 144 bytes) by value.
Sage Weil [Mon, 28 Nov 2016 19:25:39 +0000 (14:25 -0500)]
os/ObjectStore: pass by ref to clone_range
CID 1395650 (#1 of 1): Big parameter passed by value (PASS_BY_VALUE)
pass_by_value: Passing parameter noid of type ghobject_t (size 144 bytes) by value.
Sage Weil [Mon, 28 Nov 2016 19:24:57 +0000 (14:24 -0500)]
os/ObjectStore: add missing break
CID 1394998 (#1 of 1): Missing break in switch (MISSING_BREAK)
unterminated_case: The case for value ObjectStore::Transaction::OP_TRY_RENAME is not terminated by a 'break' statement.
Sage Weil [Mon, 28 Nov 2016 19:23:36 +0000 (14:23 -0500)]
os/bluestore: be pedantic about kv_stop locking
Makes coverity happy.
CID 1395346 (#1 of 1): Data race condition (MISSING_LOCK)
1. missing_lock: Accessing this->kv_stop without holding lock BlueStore.kv_lock. Elsewhere, "BlueStore.kv_stop" is accessed with BlueStore.kv_lock held 1 out of 2 times (1 of these accesses strongly imply that it is necessary).
Sage Weil [Mon, 28 Nov 2016 19:22:32 +0000 (14:22 -0500)]
os/bluestore: init all fields
9. uninit_member: Non-static class member block_size is not initialized in this constructor nor in any functions that it calls.
11. uninit_member: Non-static class member block_mask is not initialized in this constructor nor in any functions that it calls.
13. uninit_member: Non-static class member block_size_order is not initialized in this constructor nor in any functions that it calls.
CID 1396159 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
15. uninit_member: Non-static class member max_alloc_size is not initialized in this constructor nor in any functions that it calls.
Sage Weil [Mon, 28 Nov 2016 19:15:33 +0000 (14:15 -0500)]
os/bluestore: pass by ref to _collection_list
CID 1395617 (#1 of 1): Big parameter passed by value (PASS_BY_VALUE)
pass_by_value: Passing parameter end of type ghobject_t (size 144 bytes) by value.
pass_by_value: Passing parameter start of type ghobject_t (size 144 bytes) by value.
Sage Weil [Mon, 28 Nov 2016 19:11:54 +0000 (14:11 -0500)]
os/bluestore/BlueRocksEnv: fix strerror args
CID 1395399 (#1 of 1): Argument cannot be negative (NEGATIVE_RETURNS)
negative_returns: A negative constant -2 is passed as an argument to a parameter that cannot be negative.
Sage Weil [Mon, 28 Nov 2016 19:09:45 +0000 (14:09 -0500)]
os/bluestore/BlueFS: init iocv
CID 1396119 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
2. uninit_member: Non-static class member field iocv._M_elems is not initialized in this constructor nor in any functions that it calls.
Sage Weil [Mon, 28 Nov 2016 18:45:35 +0000 (13:45 -0500)]
os/bluestore/BlueFS: check flush result
CID 1394759 (#1 of 1): Unchecked return value (CHECKED_RETURN)
20. check_return: Calling _flush without checking return value (as is done elsewhere 4 out of 5 times).
Sage Weil [Mon, 28 Nov 2016 18:44:05 +0000 (13:44 -0500)]
os/bluestore/BlockDevice: init rotational
CID 1396126 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member rotational is not initialized in this constructor nor in any functions that it calls.
Orit Wasserman [Fri, 25 Nov 2016 16:30:44 +0000 (17:30 +0100)]
Merge pull request #11982 from zhouruisong/master
rgw:bugfix for deleting objects name beginning and ending with underscores of one bucket using POST method of AWS's js sdk. Reviewed-by: Orit Wasserman <owasserm@redhat.com>
Loic Dachary [Thu, 24 Nov 2016 18:52:14 +0000 (19:52 +0100)]
tests: facilitate background process debug in ceph-helpers.sh
When displaying the output of a background process, do it on stderr so
that it is not bufferized. Otherwise the output of the background
process may be displayed after it completed.
Prefix the output of a background process with the PID of the process
known to the parent instead of the PID of the awk process processing the
output. When wait_background loops, it will print the process on which
it is waiting and it is confusing that they do not match with the PID
prefixing the process output.
Kefu Chai [Tue, 15 Nov 2016 06:21:03 +0000 (14:21 +0800)]
common,test: g_ceph_context->put() upon return
prior to this change, global_init() could create a new CephContext
and assign it to g_ceph_context. it's our responsibilty to release
the CephContext explicitly using cct->put() before the application
quits. but sometimes, we fail to do so.
in this change, global_init() will return an intrusive_ptr<CephContext>,
which calls `g_ceph_context->put()` in its dtor. this ensures that
the CephContext is always destroyed before main() returns. so the
log is flushed before _log_exp_length is destroyed.
there are two cases where global_pre_init() is called directly.
- ceph_conf.cc: g_ceph_context->put() will be called by an intrusive_ptr<>
deleter.
- rgw_main.cc: global_init() is called later on on the success code
path, so it will be taken care of.
root [Mon, 14 Nov 2016 02:41:26 +0000 (10:41 +0800)]
rgw:fix for deleting objects name beginning and ending with underscores of one bucket using POST method of AWS's js sdk. Fixes: http://tracker.ceph.com/issues/17888 Signed-off-by: zhouruisong 236131368@qq.com
Venky Shankar [Wed, 23 Nov 2016 09:05:03 +0000 (14:35 +0530)]
librbd: account m_processing when failing request after refresh
AioImageRequestWQ::_void_process() dequeues an item from the
work queue by invoking ThreadPool::_void_process() which also
performs accounting by incrementing ->m_processing which never
gets decremented if an image refresh fails. This is exactly
the flow when running test_lock_fence.sh which blacklists a
client and expects failed I/O operation from the client.
Without this fix, running test_lock_fence.sh in a loop fails
with an assert in PointerWQ dtor within 100 odd runs.
Kefu Chai [Wed, 23 Nov 2016 08:16:36 +0000 (16:16 +0800)]
cmake: regroup CMAKE_CXX_FLAGS and CMAKE_C_FLAGS
- some options are only meaningful for C++, so move them into
CMAKE_CXX_FLAGS.
- regroup CMAKE_CXX_FLAGS and CMAKE_C_FLAGS, and remove the duplicated
options.
- do not reset CMAKE_CXX_FLAGS with ${CMAKE_C_FLAGS}, instead, always
append ${CMAKE_C_FLAGS} to existing ${CMAKE_CXX_FLAGS}. so we don't
clobber CMAKE_CXX_FLAGS set by command line.
ceph/src/erasure-code/jerasure/gf-complete/src/gf_w32.c: In
function ‘gf_w32_cfmgk_multiply_region_from_single’:
ceph/src/erasure-code/jerasure/gf-complete/src/gf_w32.c:410:5:
warning: ‘a’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
g = _mm_insert_epi64 (a, g_star, 0);
^