CID 1238903 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
uninit_member: Non-static class member data_chunk_count is not
initialized in this constructor nor in any functions that it calls.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
(cherry picked from commit 2bb35bba99)
CID 1238904 (#1 of 1): Uninitialized scalar variable (UNINIT)
uninit_use_in_call: Using uninitialized value e.seq when calling
log_to_syslog.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
(cherry picked from commit 2c2b413ee0)
CID 1160858 (#1 of 1): Non-virtual destructor (VIRTUAL_DTOR)
nonvirtual_dtor: Class RGWLoadGenRequest has a destructor
and a pointer to it is upcast to class RGWRequest which doesn't
have a virtual destructor.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CID 1188142 (#1 of 1): Big parameter passed by value (PASS_BY_VALUE)
pass_by_value: Passing parameter header of type
GenericObjectMap::_Header (size 176 bytes) by value.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CID 1135926 (#1 of 1): Big parameter passed by value (PASS_BY_VALUE)
pass_by_value: Catching an exception object of size 264 bytes by value.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CID 1021214 (#1 of 1): Dereference before null check (REVERSE_INULL)
check_after_deref: Null-checking cb_args suggests that it may be
null, but it has already been dereferenced on all paths leading to
the check.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CID 1238905 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
uninit_member: Non-static class member want_state is not initialized
in this constructor nor in any functions that it calls.
uninit_member: Non-static class member last_send is not initialized
in this constructor nor in any functions that it calls.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix Coverity issue, preinit with 0:
uninit_member: Non-static class member chunk_count is not initialized
in this constructor nor in any functions that it calls.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CID 1238903 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
uninit_member: Non-static class member data_chunk_count is not
initialized in this constructor nor in any functions that it calls.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CID 1238904 (#1 of 1): Uninitialized scalar variable (UNINIT)
uninit_use_in_call: Using uninitialized value e.seq when calling
log_to_syslog.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Release my_completion4.
CID 1219581 (#1 of 1): Resource leak (RESOURCE_LEAK)
leaked_storage: Variable my_completion4 going out of scope leaks
the storage it points to.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
If the file size does not fit in 32 bits the (unsigned) cast will
overflow. Cast to uint64_t which is the type of the value returned by
get_total_chunk_size.
http://tracker.ceph.com/issues/9537Fixes: #9537
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
ceph --format plain osd find 1 (and metadata) are not implemented and
must fallback to the default (json-pretty).
http://tracker.ceph.com/issues/9538Fixes: #9538
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
Add a trivial osd health test at the beginning of each group of
tests. When facing an intermittent failure, it is difficult to diagnose
if the cluster appears to be missing an OSD but there is no indication
as to when the OSDs were last up.
The tests are now only run after all OSDs are up.
These checks can be disabled with --no-sanity-check to allow running
some tests that have less requirements than running all the tests.
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
From the bash man page:
set -e exit immediately ... The shell does not exit ... if the
command's return value is being inverted with !
Add an explicit exit 1 where appropriate.
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
During bootstrap we verify that our paxos commits overlap with the other
mons we will form a quorum with. If they do not, we do a sync.
However, it is possible we pass those checks, then fail to join a quorum
before the quorum moves ahead in time such that we no longer overlap.
Currently nothing kicks up back into a probing state to discover we need
to sync... we will just keep trying to call or join an election instead.
Fix this by jumping back to bootstrap if we get a probe that is ahead of
us. Only do this from non probe or sync states as these will be common;
it is only the active and electing states that matter (and probably just
electing!).
Fixes: #9301
Backport: giant, firefly
Signed-off-by: Sage Weil <sage@redhat.com>
peon last_committed + 1 == leader first_committed is okay. Note that the
other check (where I clean up whitespace) gets this correct.
Fixes: #9301 (partly)
Signed-off-by: Sage Weil <sage@redhat.com>
Previously the code was there for storing in
the SessionMap table, but not for the ESession
logevent.
Fixes: #9518
Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit 1395275e0f)
Previously the code was there for storing in
the SessionMap table, but not for the ESession
logevent.
Fixes: #9518
Signed-off-by: John Spray <john.spray@redhat.com>
Preserve ordering of readdir result in a list, so that the result of cached
readdir is consistant with uncached readdir.
As a side effect, this commit also removes the code that removes stale dentries.
This is OK because stale dentries does not have valid lease, they will be
filter out by the shared gen check in Client::_readdir_cache_cb()
Signed-off-by: Yan, Zheng <zyan@redhat.com>
When creating a file, Client::insert_dentry_inode() set the dentry's offset
based on directory's max offset. The offset does not reflect the real
postion of the dentry in directory. Later readdir reply from real postion
of the dentry in directory. Later readdir reply from MDS may change the
dentry's position/offset. This inconsistency can cause missing/duplicate
entries in readdir result if readdir is partly satisfied by dcache_readdir().
The fix is introduce a new flag indicating if dentries in directory are
sorted. We use _readdir_cache_cb() to handle readdir only when the flag is
set, clear the flag after creating/deleting/renaming file.
Fixes: #9178
Signed-off-by: Yan, Zheng <zyan@redhat.com>