Commit Graph

29875 Commits

Author SHA1 Message Date
Danny Al-Gaaf
91627f2d33 test_seek_read.c: remove unused variable 'off64_t so'
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-11-07 23:31:15 +01:00
Danny Al-Gaaf
0da5a019f5 rgw: remove unused variables
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-11-07 23:31:15 +01:00
Danny Al-Gaaf
6566dfb740 osd/ReplicatedPG.cc: remove unused variable
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-11-07 23:31:14 +01:00
Danny Al-Gaaf
ace35f2154 Client.cc: remove unused variable from Client::CommandHook::call()
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-11-07 23:31:14 +01:00
Danny Al-Gaaf
9226a97aa2 rgw/rgw_user.cc: use static_cast<>() instead of C-Style cast
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-11-07 23:31:14 +01:00
Danny Al-Gaaf
548fc13c17 rgw/rgw_http_client.cc: use static_cast<>() instead of C-Style cast
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-11-07 23:31:14 +01:00
Danny Al-Gaaf
fbdfd87c95 remove unused variable from Objecter::RequestStateHook::call()
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-11-07 23:31:14 +01:00
Danny Al-Gaaf
d0cf2bfb32 ErasureCodeExample.h: prefer prefix ++operator for non-primitive types
Prefer prefix ++operator for non-primitive types like iterators for
performance reasons. Prefix ++/-- operators avoid creating a temporary
copy.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-11-07 23:31:14 +01:00
Danny Al-Gaaf
36ae9eb321 osd/osd_types.cc: use !p.tiers.empty() instead of size()
Use empty() since it should be prefered as it has, following the
standard, a constant time complexity regardless of the containter
type. The same is not guaranteed for size().

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-11-07 23:31:14 +01:00
Danny Al-Gaaf
6b5a96b1f1 ErasureCodeJerasure.cc: prefer prefix ++operator for non-primitive types
Prefer prefix ++operator for non-primitive types like iterators for
performance reasons. Prefix ++/-- operators avoid creating a temporary
copy.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-11-07 23:31:14 +01:00
Danny Al-Gaaf
23f7bfc2a9 osd/ErasureCodePlugin.cc: prefer prefix ++operator for non-primitive types
Prefer prefix ++operator for non-primitive types like iterators for
performance reasons. Prefix ++/-- operators avoid creating a temporary
copy.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-11-07 23:31:13 +01:00
Danny Al-Gaaf
a8e10d3d0a os/ObjectStore.cc: prefer prefix ++operator for non-primitive types
Prefer prefix ++operator for non-primitive types like iterators for
performance reasons. Prefix ++/-- operators avoid creating a temporary
copy.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-11-07 23:31:13 +01:00
Danny Al-Gaaf
555e717795 mon/OSDMonitor.cc: prefer prefix ++operator for non-primitive types
Prefer prefix ++operator for non-primitive types like iterators for
performance reasons. Prefix ++/-- operators avoid creating a temporary
copy.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-11-07 23:31:13 +01:00
Danny Al-Gaaf
0803d60709 common/buffer.cc: prefer prefix ++operator for non-primitive types
Prefer prefix ++operator for non-primitive types like iterators for
performance reasons. Prefix ++/-- operators avoid creating a temporary
copy.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-11-07 23:31:13 +01:00
Gary Lowell
5832e2603c v0.72 2013-11-07 20:27:35 +00:00
Yehuda Sadeh
84fb1bf3ee rgw: deny writes to a secondary zone by non-system users
Fixes: #6678
We don't want to allow regular users to write to secondary zones,
otherwise we'd end up with data inconsistencies.

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-11-07 09:17:22 -08:00
Sage Weil
35eaa66da0 Merge pull request #830 from ceph/port/gtest-death-tests
test: Only build death tests on platforms that support them
2013-11-07 05:47:33 -08:00
Sage Weil
d8f05024e7 doc/release-notes: note crush update timeout on startup change
Signed-off-by: Sage Weil <sage@inktank.com>
2013-11-06 20:02:09 -08:00
Sage Weil
1ee112fa2e osdmaptool: fix cli tests
From c22c84a88c.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-11-06 19:59:56 -08:00
Li Wang
082e7c9eed Ceph: Fix memory leak in chain_flistxattr()
Free allocated memory before return.

Signed-off-by: Li Wang <liwang@ubuntukylin.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-11-06 19:00:52 -08:00
Samuel Just
c7a30b8811 ReplicatedPG: don't skip missing if sentries is empty on pgls
Formerly, if sentries is empty, we skip missing.  In general,
we need to continue adding items from missing until we get
to next (returned from collection_list_partial) to avoid
missing any objects.

Fixes: #6633
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
2013-11-06 17:55:12 -08:00
Sage Weil
0c3c025c79 Merge pull request #827 from ceph/port/bootstrap
Port/bootstrap
2013-11-06 17:32:11 -08:00
Sage Weil
15599b0640 Merge pull request #831 from ceph/port/func-name
assert: choose function-var name on non-gnu

Reviewed-by: Sage Weil <sage@inktank.com>
2013-11-06 17:31:28 -08:00
Sage Weil
bd7d8239d4 Merge pull request #819 from xinglin/coverity-fixes
Coverity fixes

Reviewed-by; Sage Weil <sage@inktank.com>
2013-11-06 17:14:40 -08:00
Noah Watkins
afb3566b18 conf: use better clang detection
Handle case where compiler isn't called 'clang'. This is slightly
modified from the version here:
http://src.chromium.org/svn/branches/1312/src/third_party/mesa/MesaLib/configure.ac

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-11-06 14:33:52 -08:00
Noah Watkins
ac044812d0 assert: choose function-var name on non-gnu
Selects __PRETTY_FUNCTION__ or __func__. Linux assumes GNU, and chooses
__PRETTY_FUNCTION__ if gcc/g++ versions are favorable.

This also includes a fix in ax_c_var_func.m4:

AC_TRY_COMPILE will wrap the test in main{}, and then GCC will complain
about nested functions. Just use the original main{} body.

diff --git a/m4/ax_c_var_func.m4 b/m4/ax_c_var_func.m4
index 0ad7d2b..8b57563 100644
--- a/m4/ax_c_var_func.m4
+++ b/m4/ax_c_var_func.m4
@@ -57,9 +57,9 @@ AC_DEFUN([AX_C_VAR_FUNC],
 [AC_REQUIRE([AC_PROG_CC])
 AC_CACHE_CHECK(whether $CC recognizes __func__, ac_cv_c_var_func,
 AC_TRY_COMPILE(,
-[int main() {
+[
 char *s = __func__;
-}],
+],
 AC_DEFINE(HAVE_FUNC,,
 [Define if the C complier supports __func__]) ac_cv_c_var_func=yes,
 ac_cv_c_var_func=no) )

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-11-06 14:16:28 -08:00
Alan Somers
1d030d1ed9 test: Only build death tests on platforms that support them
googletest does not support death tests on FreeBSD.  I've submitted a
patch upstream that trivially enables support, but in the meantime we
can't compile death tests for Ceph on FreeBSD.

https://groups.google.com/forum/#!topic/googletestframework/tjY6UjWgNOw

Signed-off-by: Alan Somers <asomers@gmail.com>
2013-11-06 14:08:36 -08:00
Samuel Just
c6826c1e8a PG: fix operator<<,log_wierdness log bound warning
Split may cause holes such that head != tail and yet
log.empty().

Fixes: #6722
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
2013-11-06 11:02:32 -08:00
Samuel Just
f4648bc6fe PGLog::rewind_divergent_log: log may not contain newhead
Due to split, there may be a hole at newhead.

Fixes: #6722
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
2013-11-06 11:02:19 -08:00
Xing Lin
25b7349657 osd/ErasureCodePlugin: close library before return on error
close and free resources for library before return

Signed-off-by: Xing Lin <xinglin@cs.utah.edu>
2013-11-06 10:33:27 -07:00
Xing Lin
c3d20f2ba8 osd/erasurecode: free allocated memory before return NULL
free memory space pointed by row_ids and ind_to_row before return

Signed-off-by: Xing Lin <xinglin@cs.utah.edu>
2013-11-06 10:33:27 -07:00
Xing Lin
bfd5b9034f mon/MDSMonitor: remove unnecessary assignment
epocharg is not initialized, so it does not make any difference
to assign its value to epoch.

Signed-off-by: Xing Lin <xinglin@cs.utah.edu>
2013-11-06 10:33:26 -07:00
Xing Lin
89d5396cab osd/erasurecode: correct one variable name in jerasure_matrix_to_bitmatrix()
When bitmatrix is NULL, this function returns NULL.

Signed-off-by: Xing Lin <xinglin@cs.utah.edu>
2013-11-06 10:33:25 -07:00
Sage Weil
f5514654e0 Merge remote-tracking branch 'gh/wip-doc-radosgw' 2013-11-06 08:06:11 -08:00
Sage Weil
2aaed996a4 Revert "doc: radosgw workaround for OpenStack Horizon bug"
This reverts commit c3c962eb7d.
2013-11-06 08:06:09 -08:00
Sage Weil
befe1e1eef Merge pull request #799 from ceph/wip-doc-install
Wip doc install

Reviewed-by: Neil Levine <neil.levine@inktank.com>
2013-11-06 07:57:23 -08:00
Sage Weil
0c91576ef6 Merge pull request #821 from ceph/port/missing-headers
add missing headers

Reviewed-by: Sage Weil <sage@inktank.com>
2013-11-06 07:51:02 -08:00
Sage Weil
64b5d7060d Merge pull request #822 from ceph/port/rgw
portability patches in rgw 

Reviewed-by: Sage Weil <sage@inktank.com>
2013-11-06 07:50:20 -08:00
Sage Weil
14dfb810c4 Merge pull request #824 from dmick/next
osdmaptool: don't put progress on stdout

Reviewed-by: Sage Weil <sage@inktank.com>
2013-11-06 07:46:02 -08:00
Sage Weil
89f27a9144 Merge pull request #825 from ceph/port/utime
utime: use to_timespec for conversion

Reviewed-by: Sage Weil <sage@inktank.com>
2013-11-06 07:45:17 -08:00
Samuel Just
a3ccd29716 RadosModel: use sharedptr_registry for snaps_in_use
There might be two concurrent rollback ops each of which
adds snap x to snaps_in_use.  Between when the first
completes and the second completes, snap x may be removed
since the first would have removed snap x from snaps_in_use.
Using sharedptr_registry here avoids this by ensuring that
the snap won't be removed from snaps_in_use until all refs
are gone.

This patch also adds size() to sharedptr_registry.

Fixes: #6719
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
2013-11-05 18:00:04 -08:00
Dan Mick
c22c84a88c osdmaptool: don't put progress on stdout
If one requests JSON output, the progress message pollutes the output;
don't do that, send it to stderr instead

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-11-05 16:20:50 -08:00
Noah Watkins
81a3ea1bc0 rgw: add compat file for name service macros
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-11-05 13:38:48 -08:00
Noah Watkins
5dc64193cc rgw: avoid sighandler_t in favor of sig_t
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-11-05 13:30:24 -08:00
Noah Watkins
e9880cfc1e crush: add mising header for count
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-11-05 13:26:43 -08:00
Noah Watkins
a10345a552 auth: add missing header for list
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-11-05 13:26:33 -08:00
Noah Watkins
01a5a83841 mon: add missing header for std::find
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-11-05 13:26:27 -08:00
Noah Watkins
e71a2f0c8f auth: add missing header file for std::replace
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-11-05 13:26:19 -08:00
Yehuda Sadeh
8ca71b86f8 Merge pull request #811 from dmsimard/wip_6710
Be more verbose in radosgw init script issues, return the right exit codes

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
2013-11-05 12:25:20 -08:00
Noah Watkins
0209568c57 utime: use to_timespec for conversion
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-11-05 11:49:35 -08:00