Commit Graph

43 Commits

Author SHA1 Message Date
Sage Weil
fba798dcad remove autotools
Signed-off-by: Sage Weil <sage@redhat.com>
2016-09-07 11:50:14 -04:00
Kefu Chai
741f99073c cmake: restructure src/CMakeLists.txt in a more hierarchical way
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-19 22:23:12 +08:00
Kefu Chai
8654b65740 Merge pull request #4000 from ceph/wip-da-SCA-20150312
Fixes for Covertity issues

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-03-26 00:12:35 +08:00
Loic Dachary
306719ce5b Merge pull request #4086 from tchaikov/fix-doxygen-warnings
doc: fix doxygen warnings

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-03-23 20:35:52 +01:00
Kefu Chai
830752a528 doc: fix doxygen warnings
Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-03-19 11:50:26 +08:00
Danny Al-Gaaf
928eaaa2b2 kv_flat_btree_async.h: fix some UNINIT_CTOR issues
Fix for:

CID 728000: Uninitialized scalar field (UNINIT_CTOR)
 uninit_member: Non-static class member wait_ms is not initialized
 in this constructor nor in any functions that it calls.

CID 727995: Uninitialized scalar field (UNINIT_CTOR)
CID 727996: Uninitialized scalar field (UNINIT_CTOR)
CID 727998: Uninitialized scalar field (UNINIT_CTOR)
CID 727999: Uninitialized scalar field (UNINIT_CTOR)
 uninit_member: Non-static class member unwritable is not initialized
  in this constructor nor in any functions that it calls.
 uninit_member: Non-static class member version is not initialized
  in this constructor nor in any functions that it calls.
 uninit_member: Non-static class member size is not initialized
  in this constructor nor in any functions that it calls.

CID 727997: Uninitialized scalar field (UNINIT_CTOR)
 uninit_member: Non-static class member unwritable is not initialized
  in this constructor nor in any functions that it calls.
 uninit_member: Non-static class member size is not initialized
  in this constructor nor in any functions that it calls.

CID 727994: Uninitialized scalar field (UNINIT_CTOR)
 uninit_member: Non-static class member version is not initialized
  in this constructor nor in any functions that it calls.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-03-17 09:19:40 +01:00
Boris Ranto
96c685ee8f Minor changes in other Makefile.am files to make them support the build refinement 2015-03-06 15:19:53 +01:00
David Zafman
a03f85a8e7 osd, osdc, librados, tools, rgw: Implement pgls of all namespaces
Add release note
New librados interface
New pg_nls_response_t over the wire protocol
Ignore internal namespace (.ceph_internal)
Enhance ObjListCtx to keep independent IoCtxImpl so nspace won't change out from under listing code
Add ListObject with private implementation ListObjectImpl to return from iterator
Add EINVAL error for old librados interface when LIBRADOS_ALL_NSPACES set
Add throw to old librados c++ interface when all_nspaces set

Fixes: #9031

Signed-off-by: David Zafman <dzafman@redhat.com>
2014-10-20 10:47:50 -07:00
David Zafman
21a0eb3618 test, key_value_store: Use pool rbd since no default data pool present
Signed-off-by: David Zafman <dzafman@redhat.com>
2014-10-20 10:47:50 -07:00
Danny Al-Gaaf
59d727de2c kv_flat_btree_async.cc: remove consecutive break after return
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-06-05 00:34:08 +02:00
Danny Al-Gaaf
ea69f6b1aa cls_kvs.cc: return 'r' from get_idata_from_key()
Fix for:

69  r = 0;
    Value stored to 'r' is never read

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-11 11:55:28 +02:00
Danny Al-Gaaf
574a94056b cls_kvs.cc: remove dead assignment
Fix for:
[src/key_value_store/cls_kvs.cc:383] -> [src/key_value_store/cls_kvs.cc:386]:
 (performance) Variable 'r' is reassigned a value before the old one has been used.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-11 11:52:04 +02:00
Daniel J. Hofmann
60b1071d64 Removed extra semicolons
Signed-off-by: Daniel J. Hofmann <daniel@trvx.org>
2014-05-09 15:07:15 +02:00
Noah Watkins
bbcb022319 kvstore: only build on linux
There are several non-standard errno values used. There is still work to
do on addressing errno portability in Ceph, and this disables kvstore on
non-Linux platforms until that work is complete.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-12-29 13:31:59 -08:00
Sage Weil
0cdbc97614 librados: mark old get_version() as deprecated
Use the newly-discovered (for me) deprecated attribute to mark the old
get_version() method and point users toward get_version64().  And fix a
couple of users in the kvstore code!

Signed-off-by: Sage Weil <sage@inktank.com>
2013-12-24 07:58:08 -08:00
James Page
7ec21ed8cf Mark libcls_kvs as a module
This was missed by the changes in commit 909a733fe7

Signed-off-by: James Page <james.page@ubuntu.com>
2013-11-27 09:06:28 +00:00
Roald J. van Loon
6949d221ad automake cleanup: implementing non-recursive make
- Enabling subdir objects
- Created a Makefile-env.am with basic automake init
- Created .am files per subdir, included from src/Makefile.am

Signed-off-by: Roald J. van Loon <roaldvanloon@gmail.com>
2013-09-08 00:11:09 +02:00
Yehuda Sadeh
d30fc4bdd1 Merge remote-tracking branch 'origin/master' into wip-rgw-geo
Conflicts:
	src/Makefile.am
	src/include/rados/librados.hpp
	src/rgw/rgw_admin.cc
	src/rgw/rgw_bucket.cc
	src/rgw/rgw_common.cc
	src/rgw/rgw_common.h
	src/rgw/rgw_json_enc.cc
	src/rgw/rgw_main.cc
	src/rgw/rgw_op.h
	src/rgw/rgw_rados.cc
	src/rgw/rgw_tools.cc
	src/rgw/rgw_user.cc
	src/rgw/rgw_user.h

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-03 17:09:56 -07:00
Greg Farnum
b6c836657d key_value_store: fixup errno handling
Don't use "errno" as a variable name, and include <errno.h>
instead of some of the specific paths.

Signed-off-by: Greg Farnum <greg@inktank.com>
2013-07-02 12:39:12 -07:00
Samuel Just
47ce702ce6 *: always include rados.h using types.h
types.h redefines __le* to ceph_le* to ensure endian
safety.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-06-17 14:20:53 -07:00
Danny Al-Gaaf
8afbc28050 kv_flat_btree_async.cc: fix assigned but unused value issue
Fix "Variable 'r' is assigned a value that is never used." issue from
cppcheck. Check return value and print warning if in verbose mode.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-06-03 11:55:50 +02:00
Danny Al-Gaaf
575652aa00 key_value_store/kv_flat_btree_async.cc: fix some reassign before use value issues
Fix some cases of "(performance) Variable 'err' is reassigned a
value before the old one has been used." issues from cppcheck.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-06-03 11:55:50 +02:00
Sage Weil
648dcb9240 Merge pull request #326 from dalgaaf/wip-da-CID-727978
kv_flat_btree_async.cc: fix AioCompletion resource leak
2013-05-28 15:48:11 -07:00
Sage Weil
e8f5284026 Merge pull request #325 from dalgaaf/wip-da-CID-727980
kv_flat_btree_async.cc: fix AioCompletion resource leak
2013-05-28 10:27:56 -07:00
Danny Al-Gaaf
478b576a71 kv_flat_btree_async.cc: fix AioCompletion resource leak
Call AioCompletion::release() if the completion is no longer needed.

CID 727978 (#1-2 of 2): Resource leak (RESOURCE_LEAK)
  leaked_storage: Variable "obj_aioc" going out of scope leaks the
  storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-05-28 12:43:12 +02:00
Danny Al-Gaaf
e6efc39fad kv_flat_btree_async.cc: fix AioCompletion resource leak
Call AioCompletion::release() if the completion is no longer needed.

CID 727979 (#1-2 of 2): Resource leak (RESOURCE_LEAK)
  leaked_storage: Variable "a" going out of scope leaks the storage
  it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-05-28 12:38:57 +02:00
Danny Al-Gaaf
6939b12492 kv_flat_btree_async.cc: fix AioCompletion resource leak
Call AioCompletion::release() if the completion is no longer
needed.

CID 727980 (#1-4 of 4): Resource leak (RESOURCE_LEAK)
  leaked_storage: Variable "aioc" going out of scope leaks
  the storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-05-28 12:27:37 +02:00
Sage Weil
f0958c36fd Merge pull request #321 from dalgaaf/wip-da-CID-727981
kv_flat_btree_async.cc: fix AioCompletion resource leak
2013-05-27 13:55:54 -07:00
Danny Al-Gaaf
0f5474834a kv_flat_btree_async.cc: fix AioCompletion resource leak
Call AioCompletion::release() if the completion is no longer
needed to free the resources.

CID 727981 (#3 of 3): Resource leak (RESOURCE_LEAK)
  leaked_storage: Variable "top_aioc" going out of scope leaks the
  storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-05-24 14:50:34 +02:00
Danny Al-Gaaf
7b438e131b kv_flat_btree_async.cc: fix resource leak
Call AioCompletion::release() if the completion is no longer
needed to free the resources.

CID 727983 : Resource leak (RESOURCE_LEAK)
  leaked_storage: Variable "aioc" going out of scope leaks the
  storage it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-05-24 14:43:17 +02:00
Danny Al-Gaaf
a130cd501a kv_flat_btree_async.cc: release AioCompletion before leave the loop
CID 727982 (#1 of 1): Resource leak (RESOURCE_LEAK)
  leaked_storage: Variable "aioc" going out of scope leaks the storage
  it points to.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-05-17 13:58:40 +02:00
Danny Al-Gaaf
d1e0fc64e5 kv_flat_btree_async.cc: fix resource leak
Call AioCompletion::release() if the completion is no longer
needed to free the resources.

CID 727976 Resource leak (CWE-404)
CID 727977 Resource leak (CWE-404)

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-05-11 00:02:56 +02:00
Danny Al-Gaaf
ebd959b328 kv_flat_btree_async.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-18 12:20:43 +01:00
Danny Al-Gaaf
e8d59d563e kv_flat_btree_async.cc: prefer prefix ++operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:18:04 +01:00
Danny Al-Gaaf
46c0d9ce55 key_value_store/cls_kvs.cc: prefer prefix --operator for iterators
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-03-14 19:18:04 +01:00
Danny Al-Gaaf
1a581d0d5a kv_flat_btree_async.cc: remove unused variables
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-27 19:36:25 +01:00
Danny Al-Gaaf
b6884e8e8c kv_flat_btree_async.cc: remove some unreachable break statements
Remove unreachable break statements after return calls in a switch.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-27 19:32:23 +01:00
Danny Al-Gaaf
ebdf67f372 key_value_store/cls_kvs.cc: remove unused variable dupmap
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-02-27 19:18:05 +01:00
Danny Al-Gaaf
15248ae12b kv_flat_btree_async.cc: use empty() instead of size() to check for emptiness
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-02-14 10:27:38 -08:00
Danny Al-Gaaf
fc0a108773 cls_kvs.cc: use !empty() instead of 'size() > 0' to check for emptiness
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-02-14 10:27:38 -08:00
Dan Mick
3f53c3f016 Validate format strings for CLS_ERR/CLS_LOG
cls_log needed __attribute__((format(printf..)) to allow the compiler
to crosscheck format strings and arguments.  After adding that, there
needed to be a bunch of fixups for %ll, and a few changes for missing
arguments, etc. uncovered by the checking.

Fixes: #3970
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
2013-01-31 13:06:41 -08:00
Josh Durgin
2e366ea8aa OSD: deprecate CLS_METHOD_PUBLIC flag
Remove all existing usage, but leave the definition so third-party
class plugins don't break.

The public flag let *any* user execute a class method, as long
as they had read and/or write access as the method required. This is
better managed by the new osd caps infrastructure, and it was
entirely undocumented and unused, so it should be safe to remove.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-10-02 15:43:37 -07:00
Eleanor Cawthon
73d016fdb3 test, key_value_store: added distributed flat btree key-value store
Uses one index object and many sub objects to store key-value pairs. The pairs
are stored in the omaps of librados objects. The index contains keys
corresponding to the highest key in an object, and values that contain the
name of the object where the key range is stored. The tree guarantees that
the number of pairs in an object will be > k and < 2k for a user-specified k.
KvStoreBench contains benchmarking tests.

Signed-off-by: Eleanor Cawthon <eleanor.cawthon@inktank.com>
2012-09-02 14:46:12 -06:00