xie xingguo [Sun, 6 Aug 2017 10:50:17 +0000 (18:50 +0800)]
os/bluestore: default journal media to store media if bluefs is disabled
So we won't prevent bluestore-without-bluefs backed OSDs from booting:
0> 2017-08-06 18:28:07.431316 7ffa1c95fd00 -1 /home/xxg/build/ceph-dev/src/os/bluestore/BlueStore.cc: In function
'virtual bool BlueStore::is_journal_rotational()' thread 7ffa1c95fd00 time 2017-08-06 18:28:07.428503
/home/xxg/build/ceph-dev/src/os/bluestore/BlueStore.cc: 4401: FAILED assert(bluefs)
amitkuma [Fri, 4 Aug 2017 21:58:21 +0000 (03:28 +0530)]
Changing 'int const' to 'const int'
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.
amitkuma [Fri, 4 Aug 2017 16:46:04 +0000 (22:16 +0530)]
messages: Initializing uninitialized members module messages
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.
amitkuma [Fri, 4 Aug 2017 14:50:08 +0000 (20:20 +0530)]
messages: Initializing uninitialized members MOSDAlive
Fixes coverity Issue:
** 717300 Uninitialized scalar field
CID 717300 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
2. uninit_member: Non-static class member want is not initialized in this constructor nor in any functions that it calls.
amitkuma [Fri, 4 Aug 2017 14:44:55 +0000 (20:14 +0530)]
messages: Initializing uninitialized members MMonProbe
Fixes coverity Issue:
** 717299 Uninitialized scalar field
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 paxos_first_version is not initialized in this constructor nor in any functions that it calls.
6. uninit_member: Non-static class member paxos_last_version is not initialized in this constructor nor in any functions that it calls.
8. uninit_member: Non-static class member has_ever_joined is not initialized in this constructor nor in any functions that it calls.
CID 717299 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
10. uninit_member: Non-static class member required_features is not initialized in this constructor nor in any functions that it calls
amitkuma [Fri, 4 Aug 2017 14:37:30 +0000 (20:07 +0530)]
messages: Initializing uninitialized members MMonPaxos
Fixes coverity Issue:
2. uninit_member: Non-static class member epoch is not initialized in this constructor nor in any functions that it calls.
4. uninit_member: Non-static class member op is not initialized in this constructor nor in any functions that it calls.
6. uninit_member: Non-static class member first_committed is not initialized in this constructor nor in any functions that it calls.
8. uninit_member: Non-static class member last_committed is not initialized in this constructor nor in any functions that it calls.
10. uninit_member: Non-static class member pn_from is not initialized in this constructor nor in any functions that it calls.
12. uninit_member: Non-static class member pn is not initialized in this constructor nor in any functions that it calls.
14. uninit_member: Non-static class member uncommitted_pn is not initialized in this constructor nor in any functions that it calls.
CID 717298 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
16. uninit_member: Non-static class member latest_version is not initialized in this constructor nor in any functions that it calls.