Fixes valgrind warning:
==14803== Use of uninitialised value of size 8
==14803== at 0x12E7614: sctp_crc32c_sb8_64_bit (sctp_crc32.c:567)
==14803== by 0x12E76F8: update_crc32 (sctp_crc32.c:609)
==14803== by 0x12E7720: ceph_crc32c_le (sctp_crc32.c:733)
==14803== by 0x105085F: ceph::buffer::list::crc32c(unsigned int) (buffer.h:427)
==14803== by 0x115D7B2: Message::calc_front_crc() (Message.h:441)
==14803== by 0x1159BB0: Message::encode(unsigned long, bool) (Message.cc:170)
==14803== by 0x1323934: Pipe::writer() (Pipe.cc:1524)
==14803== by 0x13293D9: Pipe::Writer::entry() (Pipe.h:59)
==14803== by 0x120A398: Thread::_entry_func(void*) (Thread.cc:41)
==14803== by 0x503BE99: start_thread (pthread_create.c:308)
==14803== by 0x6C6E4BC: clone (clone.S:112)
Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
We need to do df on the remote host, not locally.
Simlarly, the ceph command uses the osd key, which exists remotely; run it there.
Signed-off-by: Sage Weil <sage@inktank.com>
We would need to do hostname -s on the remote node, not the local one.
But we already have $host; use it!
Reported-by: Xiaoxi Chen <xiaoxi.chen@intel.com>
Signed-off-by: Sage Weil <sage@inktank.com>
New pools won't be full. mon->pgmon()->pg_map.pg_pool_sum[poolid] will
implicitly create an entry for poolid causing register_new_pgs() to assume that
the newly created pgs in the new pool are in fact a result of a split
preventing MOSDPGCreate messages from being sent out.
Fixes: #4813
Backport: cuttlefish
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
We were always disabling compression.
Fixes: #5131
Reported-by: Sylvain Munaut <s.munaut@whatever-company.com>
Signed-off-by: Sage Weil <sage@inktank.com>
- prepend $local to the $allconf list at the top
- remove $local special case for all case
- fix the type prefix checks to explicitly check for prefixes
Fugly bash, but works!
Backport: cuttlefish, bobtail
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Wheezy's udev (175-7.2) has broken rules for the /dev/disk/by-partuuid/
symlinks that ceph-disk relies on. Install parallel rules that work. On
new udev, this is harmless; old older udev, this will make life better.
Fixes: #4865
Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
If we have not pg_map updates, the delta doesn't update, and can get stuck
with the velocity right before activity stopped. This is confusing, and
can cause incorrect health warnings about in-progress recovery.
To fix this, zero the delta if there is no activity for
'mon delta reset interval' seconds.
Fixes: #5077
Signed-off-by: Sage Weil <sage@inktank.com>
FileStoreDiff umounts the stores in its destructor.
Also, DeterministicOpSequence handles deletes its passed
object store.
Fixes: #5076
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
The finish() method for Contexts calls delete this.
This reverts commit 36028916c4.
Fixes: #5075
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
...indirectly via ceph-common. We get bad behavior when they diverge, I
think because of libcommon.la being linked both statically and dynamically.
Fixes: #4997
Backport: cuttlefish, bobtail
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
In committed_thru, we use write_pos to reset the header.start value in cases
where seq is past the end of our journalq. It is therefore important that the
journalq be updated atomically with write_pos (that is, under the write_lock).
The call to align_bl() is moved into do_write in order to ensure that write_pos
is adjusted correctly prior to write_bl().
Also, we adjust pos at the end of write_bl() such that pos \in [get_top(),
header.max_size) after write_bl().
Fixes: #5020
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
The decision to discard an op happens either in OSD or in PG.
The operation queue goes to a single OpWQ object if waiting_map does not impose a delay op_queue.
The decision to add an op to a waiting queue regardless of its type is updated.
The decision to add a CEPH_MSG_OSD_OP to a waiting queue is described in full.
http://tracker.ceph.com/issues/5058 refs #5058
Signed-off-by: Loic Dachary <loic@dachary.org>
CID 1019559 (#1 of 1): Dereference after null check (FORWARD_NULL)
var_deref_model: Passing null pointer "usr" to function
"RGWUser::get_store()", which dereferences it.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Assert if straydn is NULL.
CID 1019554 (#2 of 2): Dereference after null check (FORWARD_NULL)
var_deref_model: Passing null pointer "straydn" to function
"MDSCacheObject::is_auth() const", which dereferences it.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Assert of straydn is NULL here.
CID 1019558 (#1 of 1): Dereference after null check (FORWARD_NULL)
var_deref_model: Passing null pointer "straydn" to function
"CDentry::get_dir() const", which dereferences it.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Assert if destdn == NULL.
CID 1019557 (#1 of 1): Dereference after null check (FORWARD_NULL)
var_deref_model: Passing null pointer "destdn" to function
"CDentry::get_dir() const", which dereferences it.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Add missing Lock around code changing AioCompletionImpl::rval/ack and safe
in C_AioCompleteAndSafe::finish().
CID 1019565 (#1 of 1): Data race condition (MISSING_LOCK)
missing_lock: Accessing "this->c->rval" ("_ZN8librados17AioCompletionImplE.rval")
requires the "Mutex._m" lock.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CID 1019545 (#1 of 1): Unchecked return value (CHECKED_RETURN)
check_return: Calling function "ObjectStore::list_collections
(std::vector<coll_t, std::allocator<coll_t> > &)" without
checking return value (as is done elsewhere 5 out of 6 times).
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CID 1019555 (#1 of 1): Dereference after null check (FORWARD_NULL)
var_deref_model: Passing null pointer "in" to function
"Server::_need_force_journal(CInode *, bool)", which dereferences it.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CID 1019568 (#1 of 1): Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
overflow_before_widen: Potentially overflowing expression "1 << *order" with
type "int" (32 bits, signed) is evaluated using 32-bit arithmetic before being
used in a context which expects an expression of type "uint64_t" (64 bits,
unsigned). To avoid overflow, cast the left operand to "uint64_t" before
performing the left shift.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CID 1019623 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
uninit_member: Non-static class member "timecheck_acks" 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 1019624 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
uninit_member: Non-static class member "crc" 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 1019626 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
uninit_member: Non-static class member "flags" 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 1019635 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
uninit_member: Non-static class member "kt" 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 717123 (#1-2 of 2): Resource leak (RESOURCE_LEAK)
leaked_storage: Variable "buf" going out of scope leaks the storage
it points to.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CID 717122 (#1 of 1): Resource leak (RESOURCE_LEAK)
leaked_handle: Handle variable "fd" going out of scope leaks
the handle.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CID 717121 (#1 of 1): Resource leak (RESOURCE_LEAK)
leaked_handle: Handle variable "fd" going out of scope leaks the handle.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CID 716885 (#1 of 1): Resource leak in object (CTOR_DTOR_LEAK)
alloc_new: Allocating memory by calling "new C_SafeCond(&this->lock,
&this->cond, &this->done, NULL)".
ctor_dtor_leak: The constructor allocates field "c" of "C_Sync" but
the destructor and whatever functions it calls do not free it.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CID 719581 (#7 of 7): Resource leak (RESOURCE_LEAK)
CID 719581 (#6 of 7): Resource leak (RESOURCE_LEAK)
leaked_storage: Variable "pools" going out of scope leaks the
storage it points to.
CID 719582 (#6-7 of 7): Resource leak (RESOURCE_LEAK)
leaked_storage: Variable "children" going out of scope leaks
the storage it points to.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Make sure rados_shutdown() get called also in error case.
CID 717106 (#1 of 1): Resource leak (RESOURCE_LEAK)
leaked_storage: Variable "cl" going out of scope leaks the
storage it points to.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CID 727984 (#5 of 5): Resource leak (RESOURCE_LEAK)
leaked_storage: Variable "cb_args" going out of scope leaks the storage
it points to.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CID 717107 (#1 of 1): Resource leak (RESOURCE_LEAK)
leaked_storage: Variable "store" going out of scope leaks the
storage it points to.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CID 1019589 (#1 of 1): Resource leak (RESOURCE_LEAK)
leaked_storage: Variable "t" going out of scope leaks the
storage it points to.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CID 1019590 (#1 of 1): Resource leak (RESOURCE_LEAK):
leaked_storage: Variable "rmt" going out of scope leaks the
storage it points to.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>