Sebastien Ponce [Thu, 6 Feb 2014 10:38:44 +0000 (11:38 +0100)]
Added unit test suite for the Rados striping API.
This includes tests for standard io and asynchronous io, similar to what is tested in the rados tests.
In addition, it includes in depth tests of the striping itself.
Sebastien Ponce [Thu, 5 Jun 2014 15:17:40 +0000 (17:17 +0200)]
Implementation of the radosstriper interface.
The user facing API is implemented in libradosstriper.cc and the backend in RadosStriperImpl.cc.
Details on how the code works are given in a comment at the top of RadosStriperImple.cc
Ilya Dryomov [Thu, 5 Jun 2014 06:08:42 +0000 (10:08 +0400)]
XfsFileStoreBackend: call ioctl(XFS_IOC_FSSETXATTR) less often
No need to call ioctl(XFS_IOC_FSSETXATTR) if extsize is already set to
the value we want or if any extents are allocated - XFS will refuse to
change extsize in that's the case.
Sage Weil [Thu, 5 Jun 2014 17:43:16 +0000 (10:43 -0700)]
include/atomic: make 32-bit atomic64_t unsigned
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);
^
Sage Weil [Thu, 5 Jun 2014 18:56:58 +0000 (11:56 -0700)]
ceph-objectstore-test: fix warning in collect_metadata test
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]
Sebastien Ponce [Tue, 4 Feb 2014 16:38:37 +0000 (17:38 +0100)]
Added a striper interface on top of rados called radosstriper.
This interface allows to manipulate striped objects stored in a rados cluster with a standard open/read/write/stat/close/remove API.
Asynchronous APIs are also provided for data transfers and both C and C++ APIs are present.
Danny Al-Gaaf [Wed, 4 Jun 2014 21:22:18 +0000 (23:22 +0200)]
librbd/internal.cc: check earlier for null pointer
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>
Danny Al-Gaaf [Wed, 4 Jun 2014 21:10:42 +0000 (23:10 +0200)]
test/librbd/fsx.c: fix gcc warning
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>
Danny Al-Gaaf [Wed, 4 Jun 2014 20:33:51 +0000 (22:33 +0200)]
common/addr_parsing.c: fix realloc memory leak
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>
Ilya Dryomov [Wed, 4 Jun 2014 13:34:06 +0000 (17:34 +0400)]
automake: add dummy.cc to fix 'make tags'
Commit 421e6c561704 ("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'.
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>
Loic Dachary [Tue, 3 Jun 2014 11:05:19 +0000 (13:05 +0200)]
documentation: update osd pool create erasure
The properties are replaced with erasure code profiles. Remove the
reference to properties and the documentation of each erasure-code
related property.
Josh Durgin [Tue, 3 Jun 2014 00:34:50 +0000 (17:34 -0700)]
librbd: clarify license header
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.
sushma [Wed, 28 May 2014 22:27:54 +0000 (15:27 -0700)]
RadosClient: Avoid the DispatchQueue for OSD responses.
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.
Ilya Dryomov [Tue, 27 May 2014 14:35:36 +0000 (18:35 +0400)]
qa: catch up with xfstests changes
Back in 2013 xfstests were rearranged, which also changed the way
./check parses test lists. Catch up with those changes. Note that
tests can no longer be listed in ranges, we only accept individual
tests and test groups (e.g. -g quick).
Ilya Dryomov [Fri, 30 May 2014 09:37:04 +0000 (13:37 +0400)]
qa: cp run_xfstests.sh run_xfstests-obsolete.sh
run_xfstests.sh is going to be updated in the next commit to be able to
drive newer xfstests. Among other things, the new xfstests proper
doesn't support listing tests in ranges, which is what the qemu wrapper
(run_xfstests_qemu.sh) relies on. So keep a copy of the old
run_xfstests.sh around until the qemu vm image is regenerated and the
up-to-date exclusion list for that kernel is shaken out.