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
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.
Signed-off-by: Amit Kumar amitkuma@redhat.com
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
Signed-off-by: Amit Kumar amitkuma@redhat.com