This fixes
In file included from test/perf_counters.cc:19:0:
./common/perf_counters.h: In member function ‘std::pair PerfCounters::perf_counter_data_any_d::read_avg() const’:
warning: ./common/perf_counters.h:156:36: comparison between signed and unsigned integer expressions [-Wsign-compare]
} while (avgcount2.read() != count);
^
Signed-off-by: Sage Weil <sage@inktank.com>
In file included from test/objectstore/store_test.cc:33:0:
../src/gtest/include/gtest/gtest.h: In function ‘testing::AssertionResult testing::internal::CmpHelperNE(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int, T2 = int]’:
test/objectstore/store_test.cc:82:5: instantiated from here
warning: ../src/gtest/include/gtest/gtest.h:1379:1: comparison between signed and unsigned integer expressions [-Wsign-compare]
Signed-off-by: Sage Weil <sage@inktank.com>
These methods have side-effects: they move the decode iterator *and*
return a value. Rename them to avoid confusion with typical get_*
accessors.
Signed-off-by: Sage Weil <sage@inktank.com>
Don't assign return value of i.get_length() to a variable until
they are really used. Added comment on what is the intention of
the variables.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Don't assign return value of i.get_length() to a variable until
they are really used. Added comment on what is the intention of
the variables.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix potential null ponter deref, move check for 'order != NULL'
to the beginning of the function to prevent a) deref in ldout() call
and b) to leave function as early as possible if check fails.
[src/librbd/internal.cc:843] -> [src/librbd/internal.cc:865]: (warning)
Possible null pointer dereference: order - otherwise it is redundant
to check it against null.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Initialize pointer with NULL before call posix_memalign() to fix
gcc warning:
test/librbd/fsx.c:1402:13: warning: ‘temp_buf’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
if ((ret = ops->read(&cur_ctx, 0, file_info.st_size, temp_buf)) < 0) {
^
test/librbd/fsx.c:1398:13: warning: ‘good_buf’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
if ((ret = pread(fd, good_buf, file_info.st_size, 0)) < 0) {
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix handling of realloc. If realloc() fails it returns NULL, assigning
the return value of realloc() directly to the pointer without checking
for the result will lead to a memory leak in error case.
Use a temporary pointer to hold the result of realloc(). In error case
print error and exit, otherwise assign it to the pointer we want to realloc.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Add assert checks for some more set_val() calls to fix cppcheck issue
"Variable 'ret' is reassigned a value before the old one has been used"
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Removes two unused variables expected_object_size and
expected_write_size in KeyValueStore.cc
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@cloudwatt.com>
Removes two unused variables expected_object_size and
expected_write_size in MemStore.cc
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@cloudwatt.com>
Commit 421e6c5617 ("test_librbd_fsx: add krbd mode support") added
a requirement for ceph_test_librbd_fsx to be linked with a C++ linker.
Implement it in a way that doesn't break 'make tags'.
Fixes: #8530
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Removes 3 not used operators (intersect, union,
and diff) since after use those methods fpp and is_full are
corrupted.
Fixes: #8476
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@cloudwatt.com>
Adds to TEST(BloomFilter, Basic) a new assertion
to verify the good behavior of the method 'element_count()'.
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@cloudwatt.com>
We were not breaking out of the loop when we filled up the buffer unless
we happened to do so on a pool name boundary. This means that len would
roll over (it was unsigned). In my case, I was not able to reproduce
anything particularly bad since (I think) the strncpy was interpreting the
large unsigned value as signed, but in any case this fixes it, simplifies
the arithmetic, and adds a simple test.
- use a single 'rl' value for the amount of buffer space we want to
consume
- use this to check that there is room and also as the strncat length
- rely on the initial memset to ensure that the trailing 0 is in place.
Fixes: #8447
Signed-off-by: Sage Weil <sage@inktank.com>
librbd: clarify license header to say LGPL
Everybody who has contributed has already explicitly agreed to relicense RBD to LGPL...except for me, and I am granting it now.
Reviewed-by: Greg Farnum <greg@inktank.com>
And a link from rados/operations.
http://tracker.ceph.com/issues/8514Fixes: #8514
Reported-by: Kenneth Waegeman <Kenneth.Waegeman@UGent.be>
Signed-off-by: Loic Dachary <loic@dachary.org>
The properties are replaced with erasure code profiles. Remove the
reference to properties and the documentation of each erasure-code
related property.
Signed-off-by: Loic Dachary <loic@dachary.org>
Looks like 'foo' is a leftover, see commit ea9fc87d89 ("doc: Removed
foo. Apparently myimage was added and foo not removed.").
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
These were meant to say LGPL, but a typo was propagated and it
referred to the non-existent GPL2.1, and also to COPYING which
correctly indicated these files were LGPL2.1.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Prior to this change, reader thread puts the response on the DispatchQueue
and Dispatcher thread would call librados callbacks (C_aio_Ack, C_Safe_Cond).
The single DispatchQueue and Dispatcher thread (per client) would become
a bottleneck with multiple OSDs in the cluster.
Similar to fast-dispatch changes on the OSD, DispatchQueue/thread are removed
and librados internal callbacks will be called from reader thread context.
Signed-off-by: Sushma Gurram <sushma.gurram@sandisk.com>
Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
Reviewed-by: Greg Farnum <greg@inktank.com>