os/bluestore: misc coverity fixes/cleanups #12202

Merged
merged 12 commits into from Nov 29, 2016

Projects

None yet

2 participants

@liewegas
Member

No description provided.

@liewegas liewegas 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.

Signed-off-by: Sage Weil <sage@redhat.com>
c844efe
@liewegas liewegas added this to the kraken milestone Nov 28, 2016
liewegas added some commits Nov 28, 2016
@liewegas liewegas 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).

Signed-off-by: Sage Weil <sage@redhat.com>
81de672
@liewegas liewegas 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.

Signed-off-by: Sage Weil <sage@redhat.com>
ff0abab
@liewegas liewegas 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.

Signed-off-by: Sage Weil <sage@redhat.com>
29847b2
@liewegas liewegas 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.

Signed-off-by: Sage Weil <sage@redhat.com>
5b7dc94
@liewegas liewegas os/ObjectStore: pass by ref to collection_list
Signed-off-by: Sage Weil <sage@redhat.com>
9795cea
@liewegas liewegas 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.

Signed-off-by: Sage Weil <sage@redhat.com>
08bcc85
@liewegas liewegas 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).

Signed-off-by: Sage Weil <sage@redhat.com>
614e955
@liewegas liewegas 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.

Signed-off-by: Sage Weil <sage@redhat.com>
ac72b77
@liewegas liewegas 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.

Signed-off-by: Sage Weil <sage@redhat.com>
047bb40
@liewegas liewegas 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.

Signed-off-by: Sage Weil <sage@redhat.com>
65c6156
@liewegas liewegas 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.

Signed-off-by: Sage Weil <sage@redhat.com>
4a60ead
@markhpc

LGTM

@markhpc
Member
markhpc commented Nov 29, 2016

retest this please

@markhpc markhpc merged commit dd5845c into ceph:master Nov 29, 2016

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment