Fixes the coverity issue:
1274326 Uninitialized pointer field
2. uninit_member: Non-static class member m_client is not initialized in
this constructor nor in any functions that it calls.
CID 1274326 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
4. uninit_member: Non-static class member m_pool is not initialized in
this constructor nor in any functions that it calls.
Signed-off-by: Amit Kumar amitkuma@redhat.com
This will pervent OSDMonitor from crashing on purging a very large
non-existent osd id as below:
osd e11 prepare_command_osd_purge purging osd.8
-1> 2017-08-05 18:59:44.994319 7f6076968700 10 mon.a@0(leader).osd e11 prepare_command_osd_destroy osd.8 does not exist.
0> 2017-08-05 18:59:45.002309 7f6076968700 -1 /home/xxg/build/ceph-dev/src/osd/OSDMap.h: In function 'int OSDMap::get_state(int) const'
thread 7f6076968700 time 2017-08-05 18:59:44.994336
/home/xxg/build/ceph-dev/src/osd/OSDMap.h: 690: FAILED assert(o < max_osd)
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
If a class is no more referenced by any devices or crush rules,
it shall be considered as dead.
This patch makes Ceph automatically recycles those dead classes,
so user does not to explicitly call 'class rm', which is unsafe
and annoying.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
The current version is broken. E.g., it should only remove a class
which is never referenced by any device.
Since we now create new classes automatically, we shall automatically
recycle dead classes too. So this command is definitely unuseful.
(Actually it is weird that we keep 'class rm' without keeping the
corresponding 'class create' command).
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
As per coding Guidelines 'const int' is recommended over 'int const'
https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md
NL.26: Use conventional const notation
Example:
const int x = 7; // OK
int const y = 9; // bad
Note
We are well aware that you could claim the "bad" examples more logical than the ones marked "OK", but they also confuse more people, especially novices relying on teaching material using the far more common, conventional OK style.
As ever, remember that the aim of these naming and layout rules is consistency and that aesthetics vary immensely.
Enforcement
Flag const used as a suffix for a type.
Signed-off-by: Amit Kumar amitkuma@redhat.com
Additionally makes sure when unexpected values are provided for config
options osd_op_queue or osd_op_queue_cut_off that the default values
are assigned.
Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
Fixes coverity Issue:
** 2. uninit_member: Non-static class member flags is not initialized in this constructor nor in any functions that it calls.
4. uninit_member: Non-static class member epoch is not initialized in this constructor nor in any functions that it calls.
CID 717301 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
6. uninit_member: Non-static class member failed_for is not initialized in this constructor nor in any functions that it calls.
2. uninit_member: Non-static class member oldest_map is not initialized in this constructor nor in any functions that it calls.
CID 717302 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
4. uninit_member: Non-static class member newest_map is not initialized in this constructor nor in any functions that it calls.
2. uninit_member: Non-static class member client_inc is not initialized in this constructor nor in any functions that it calls.
4. uninit_member: Non-static class member osdmap_epoch is not initialized in this constructor nor in any functions that it calls.
6. uninit_member: Non-static class member flags is not initialized in this constructor nor in any functions that it calls.
8. uninit_member: Non-static class member retry_attempt is not initialized in this constructor nor in any functions that it calls.
CID 717303 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
10. uninit_member: Non-static class member features is not initialized in this constructor nor in any functions that it calls.
2. uninit_member: Non-static class member flags is not initialized in this constructor nor in any functions that it calls.
4. uninit_member: Non-static class member user_version is not initialized in this constructor nor in any functions that it calls.
6. uninit_member: Non-static class member osdmap_epoch is not initialized in this constructor nor in any functions that it calls.
CID 717304 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
8. uninit_member: Non-static class member retry_attempt is not initialized in this constructor nor in any functions that it calls.
2. uninit_member: Non-static class member op is not initialized in this constructor nor in any functions that it calls.
4. uninit_member: Non-static class member map_epoch is not initialized in this constructor nor in any functions that it calls.
CID 717305 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
6. uninit_member: Non-static class member query_epoch is not initialized in this constructor nor in any functions that it calls.
CID 717306 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member epoch is not initialized in this constructor nor in any functions that it calls.
Signed-off-by: Amit Kumar amitkuma@redhat.com
3408cb8 Merge pull request #33 from ceph/wip-move-make-options-up
f2099ec Moved the check for cmake's DO_NOT_DELAY_TAG_CALC to the top level, so it will affect how tests are built.
437b247 Merge pull request #32 from ceph/wip_add_void_comments
18dd014 Add documentation as to why there are empty void references.
3ddfa39 Merge pull request #28 from Yan-waller/wip-waller-0710dmclockgettime
57520df Merge pull request #31 from dingdangzhang/master
4cad292 delete redundant break statement
b179f3b Merge pull request #29 from tchaikov/wip-cmake
76d5f35 cmake: build gtest if not found
9896fef Merge pull request #30 from tchaikov/wip-move
d72fac1 do FRIEND_TEST manually
f4b155d enforce move semantics of request types
8a2ad2a replace gettimeofday() with clock_gettime() function
b84ccf9 Merge pull request #27 from ceph/joelin-master-ei
34a6e25 Set compiler flags at higher level CMakeLists.txt file, so they apply to sim and test, and so earlier versions of GCC know to use c++11 standard. Clean up cmake files in general.
bad581a Move the PrCtl data structure into a separate header file that can be included where needed in the future. Also, to avoid potential naming conflicts with ceph's PrCtl.h, prefix the filename with "dmc".
1b227bf Merge pull request #25 from badone/wip-test_dmclock_server-coredump
ee1866e dmclock: Don't dump core when using EXPECT_DEATH_IF_SUPPORTED
git-subtree-dir: src/dmclock
git-subtree-split: 3408cb8f3c20d1956d8a08f15958627fbb60e733