summaryrefslogtreecommitdiffstats
path: root/src/librados (follow)
Commit message (Collapse)AuthorAgeFilesLines
* common/config: pass entity_type down into parse_env()Sage Weil2019-03-081-3/+3
| | | | | | No functional change, but we'll need this shortly. Signed-off-by: Sage Weil <sage@redhat.com>
* librados: add symbol versioning to the C++ APIJason Dillaman2019-02-213-33/+26
| | | | | | | | | The future goal would be to change the version for each Ceph major release to ensure C++ applications will need to be recompiled against the librados C++ API since we don't guarentee ABI stability. Fixes: https://tracker.ceph.com/issues/38177 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
* librados: add symbol versioning to the C APIJason Dillaman2019-02-205-604/+982
| | | | Signed-off-by: Jason Dillaman <dillaman@redhat.com>
* librados: revert librados3/libradoscc back to librados2Jason Dillaman2019-02-201-28/+4
| | | | | | | | For backwards compatibility and upgrade reasons, the librados2 API needs to be preserved and it needs to continue to be compatible with dependent libraries like librbd1. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
* librados: don't claim ObjectOperation::cmpext() bufferIlya Dryomov2019-02-191-2/+3
| | | | | | | | This is counter-intuitive and doesn't match the behavior of either other compare ops (cmpxattr, omap_cmp) or write ops. Fixes: http://tracker.ceph.com/issues/38383 Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
* msg/Dispatcher: remove force_new arg from ms_get_authorizer()Sage Weil2019-01-172-3/+2
| | | | Signed-off-by: Sage Weil <sage@redhat.com>
* rados, librados: Get errors back to callerDavid Zafman2018-12-141-3/+5
| | | | | | Remove redundant error message Signed-off-by: David Zafman <dzafman@redhat.com>
* librados: fix a way rados approximate per-pool net amount.Igor Fedotov2018-12-062-8/+8
| | | | | | | In fact that's just a workaround for now as we need proper raw_used_rate present at librados. Signed-off-by: Igor Fedotov <ifedotov@suse.com>
* rados,mon: improve ceph and rados df reports.Igor Fedotov2018-12-062-4/+27
| | | | | | | | | | | | | | | | | | | | | | Fixes: https://tracker.ceph.com/issues/22159 Fixes: https://tracker.ceph.com/issues/20870 This adds more parameters to estimate allocation granularity overhead and compression effectiveness. RAW_USED column has been removed. USED column reflects amount of space allocated for a pool at all replicas. Including allocaction granularity overhead and taking ompression savings and object content gaps into account. Following columns were appended: * STORED - approximation of bytes users've actually stored in a pool, i.e netto data amount without compression, allocation and other overheads (not applicable for 'rados df'). * USED COMPR - amount of bytes allocated to store compressed data, i.e. compressed data plus allocation/replication overhead. * UNDER COMPR - amount of data(icluding repicated one) passed through compression and stored in that form. Signed-off-by: Igor Fedotov <ifedotov@suse.com>
* Merge PR #23550 into masterSage Weil2018-12-051-1/+2
|\ | | | | | | | | * refs/pull/23550/head: auth: Kerberos authentication
| * auth: Kerberos authenticationoliveiradan2018-12-041-1/+2
| | | | | | | | Signed-off-by: Daniel Oliveira <doliveira@suse.com> (github: oliveiradan)
* | librados: NObjectIteratorImpl::get_next() throws std::system_errorCasey Bodley2018-11-262-5/+3
|/ | | | | | this allows the catcher to retrieve the original error code Signed-off-by: Casey Bodley <cbodley@redhat.com>
* Merge pull request #24014 from yehudasa/wip-rgw-svc-2Yehuda Sadeh2018-11-081-0/+13
|\ | | | | | | | | | | rgw: initial RGWRados refactoring work Reviewed-by: Casey Bodley <cbodley@redhat.com> Reviewed-by: Matt Benjamin <mbenjami@redhat.com>
| * librados: add move operations to IoCtxCasey Bodley2018-11-081-0/+13
| | | | | | | | Signed-off-by: Casey Bodley <cbodley@redhat.com>
* | Merge pull request #24896 from tchaikov/wip-librados-cleanupKefu Chai2018-11-084-141/+10
|\ \ | |/ |/| | | | | librados,rpm,deb: various fixes to address librados3 transition and cleanups in librados Reviewed-by: Josh Durgin <jdurgin@redhat.com>
| * librados: remove rados_tmap_*Kefu Chai2018-11-074-113/+0
| | | | | | | | | | | | | | | | | | | | | | | | we have switched from tmap to omap long ago. but keep the server side implementation around, in case ancient client is still using these tmap APIs. also, tmap_update() is kept, because librbd is using it for v1 image backward compatibility. Signed-off-by: Kefu Chai <kchai@redhat.com>
| * librados: add new setxattr overload backKefu Chai2018-11-071-0/+7
| | | | | | | | | | | | this change reverts b8ff781ddcf737882163cf56d7c9b11e815fb699 Signed-off-by: Kefu Chai <kchai@redhat.com>
| * librados: remove redundant IoCtx::nobjects_begin() variantsKefu Chai2018-11-071-18/+0
| | | | | | | | | | | | this change partially reverts 6eca7d08893abbe41f7fa6b2834fb05e84be572b Signed-off-by: Kefu Chai <kchai@redhat.com>
| * librados: deprecate ObjectWriteOperation::copy_from()Kefu Chai2018-11-071-10/+3
| | | | | | | | | | | | this change partially reverts 6eca7d08893abbe41f7fa6b2834fb05e84be572b Signed-off-by: Kefu Chai <kchai@redhat.com>
* | librados: update for CLI arg format changeJohn Spray2018-11-071-1/+1
|/ | | | Signed-off-by: John Spray <john.spray@redhat.com>
* cmake: bump librados so versionKefu Chai2018-11-011-2/+2
| | | | Signed-off-by: Kefu Chai <kchai@redhat.com>
* librados: move C++ APIs into libradosppKefu Chai2018-11-018-3026/+3146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the goal is to decouple C++ API from C API, and to version them differently, as they are targeting different consumers. this allows us to change the C++ API and bumping up its soversion without requiring consumer to recompile the librados client for using the new librados. in this way, C++ API can move faster than C API. for example, if bufferlist interface is changed for better performance, and this breaks existing API/ABI, we can bump up the C++ library's soversion, and and the C library's version unchanged but ship the new librados's C binding. so the librados client linked against librados's C library will be able to take advantage of the improvement in C++ library. while the librados client linked against C++ library won't break at runtime due to unresolved symbol or changed structure layout. this is massive change, the genereal idea is to * split librados.cc into two source files: librados_c.cc and librados_cxx.cc, the former for implementing C APIs, the later for C++ APIs. * extract the C++ API in librados into librados-cxx, the library name will be libradospp. but we can change it before nautilus is released. * link these librados libraries with static libraries which it depends on, so "-Wl,--exclude-libs,ALL" link flags can help hide the non-public symbols. * extract the tests exercising librados' C++ API into a different source file named *_cxx.cc. for instance, to move the C++ tests in aio.cc into aio_cxx.cc * extract the shared helper functions which do not use any librados or librados-cxx APIs into test_shared{.cc,h}. the "shared" here means, *shared* by C++ and C tests. * extract the test fixtures, i.e., the subclasses of testing::Test, for testing C++ APIs into testcase_cxx.cc. * update qa/workunits/rados/test.sh accordingly to add the splitted tests * update the consumers of librados to link against librados-cxx instead, if they are using the C++ API. Signed-off-by: Kefu Chai <kchai@redhat.com>
* librados: move get_inconsistent_pgs() into RadosClientKefu Chai2018-11-013-74/+65
| | | | | | | | | | | | so we don't need parse the pg string and render it again for librados C API. the downside of this change is that, get_inconsistent_pgs() could be implemented using RadosClient, instead be *in* it. but before we have a place for the helper functions for these higher-level functions, RadosClient is a good place for hosting them. Signed-off-by: Kefu Chai <kchai@redhat.com>
* Merge PR #24534 into masterSage Weil2018-10-301-0/+3
|\ | | | | | | | | | | | | * refs/pull/24534/head: librados: Copy buffer on AIO read Reviewed-by: Kefu Chai <kchai@redhat.com>
| * librados: Copy buffer on AIO readWido den Hollander2018-10-111-0/+3
| | | | | | | | | | | | Fixes: https://tracker.ceph.com/issues/36345 Signed-off-by: Wido den Hollander <wido@42on.com>
* | librados: fix unitialized timeout in wait_for_osdmapCasey Bodley2018-10-241-2/+1
| | | | | | | | Signed-off-by: Casey Bodley <cbodley@redhat.com>
* | Merge pull request #20004 from mogeb/steady-clock-tools-radosKefu Chai2018-10-222-4/+7
|\ \ | | | | | | | | | | | | librados: use steady clock for rados_mon_op_timeout Reviewed-by: Kefu Chai <kchai@redhat.com>
| * | librados: use steady clock for rados_mon_op_timeoutMohamad Gebai2018-05-212-4/+7
| | | | | | | | | | | | Signed-off-by: Mohamad Gebai <mgebai@suse.com>
* | | librados: Mutex::Locker -> std::lock_guardSage Weil2018-10-162-9/+9
| |/ |/| | | | | Signed-off-by: Sage Weil <sage@redhat.com>
* | Merge pull request #23622 from renhwztetecs/renhw-wip-25103John Spray2018-10-101-2/+14
|\ \ | | | | | | | | | | | | | | | mgr: fixup pgs show in unknown state Reviewed-by: Kefu Chai <kchai@redhat.com> Reviewed-by: John Spray <john.spray@redhat.com>
| * | librados: Add compatible code to PG new pg_state_ready fieldhuanwen ren2018-09-271-2/+14
| | | | | | | | | | | | | | | Fixes: http://tracker.ceph.com/issues/25103 Signed-off-by: huanwen ren <ren.huanwen@zte.com.cn>
* | | common: fix typosKefu Chai2018-09-211-1/+1
| | | | | | | | | | | | Signed-off-by: Kefu Chai <kchai@redhat.com>
* | | Merge pull request #23823 from dillaman/wip-namespace-osd-checkJason Dillaman2018-09-203-0/+27
|\ \ \ | | | | | | | | | | | | | | | | | | | | librbd: prevent use of namespaces on pre-nautilus OSDs Reviewed-by: Mykola Golub <mgolub@suse.com> Reviewed-by: Josh Durgin <jdurgin@redhat.com>
| * | | librados: new get_min_compatible_osd API helper methodsJason Dillaman2018-08-283-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These methods retrieve the current minimum required OSD version from the OSD map. This can help client applications determine if new features are supported by the cluster. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
* | | | Rename "include/assert.h"Brad Hubbard2018-09-142-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This conflicts with the system assert.h so rename and change includes to reflect the new name. Fixes: http://tracker.ceph.com/issues/35682 Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
* | | | Merge pull request #23839 from trociny/wip-migration-commit-raceJason Dillaman2018-09-101-0/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | librbd: fix potential live migration after commit issues due to not refreshed image header Reviewed-by: Jason Dillaman <dillaman@redhat.com>
| * | | | librados/calc_snap_set_diff: return empty diff if need to read whole objectMykola Golub2018-08-311-0/+1
| |/ / / | | | | | | | | | | | | Signed-off-by: Mykola Golub <mgolub@suse.com>
* | | | librados: deprecate calls that take auidSage Weil2018-08-315-68/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Return EOPNOTSUPP for auid-specific calls, or EINVAL for ones that get a non-default auid value. Signed-off-by: Sage Weil <sage@redhat.com>
* | | | osdc/Objecter: do not pass auid to create_poolSage Weil2018-08-311-2/+2
|/ / / | | | | | | | | | Signed-off-by: Sage Weil <sage@redhat.com>
* | | librados: Use ceph_assert for asserts.Adam C. Emerson2018-08-275-41/+41
| | | | | | | | | | | | Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
* | | librados: add a rados_omap_iter_size functionJeff Layton2018-08-151-0/+6
|/ / | | | | | | | | | | | | | | | | | | | | Sometimes we need to know how many elements are represented by an omap iterator. Add a new rados_omap_iter_size to return the number of elements in the returned iterator. Also add some sanity checks for this to existing tests. Tracker: http://tracker.ceph.com/issues/26948 Signed-off-by: Jeff Layton <jlayton@redhat.com>
* | cmake: fix "WITH_STATIC_LIBSTDCXX"Kefu Chai2018-07-281-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - do not link libkv with ALLOC_LIBS, it turns out that if we link tcmalloc *before* -static-libstdc++ -static-libgcc, libstdc++ and gcc libs will show up in `ldd` output - add `-static-libstdc++ -static-libgcc` to CMAKE_SHARED_LINKER_FLAGS and CMAKE_EXE_LINKER_FLAGS instead of adding them to all shared libraries and executable. simpler this way. - link against libtcmalloc statically, because libtcmalloc is a C++ library, linking against it dynamically and linking against C++ runtime statically will pull in depdencies on two versions of C++ runtime, which will bring down the app at run-time. - do not pass '-pie' to linker when building executable if `WITH_STATIC_LIBSTDCXX` and tcmalloc is used, because the static tcmalloc is not compiled with PIC. - only apply '-pie' if ENABLE_SHARED is enabled. Signed-off-by: Kefu Chai <kchai@redhat.com>
* | common,rbd,rgw,osd: extract config values into ConfigValuesKefu Chai2018-07-102-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this change introduce three classes: ConfigValues, ConfigProxy and ConfigReader. in seastar port of OSD, each CPU shard will hold its own reference of configuration, and upon changes of settings, each shard will be updated with the new setting in async. so this forces us to be able to keep two set of configuration at the same time. so we need to extract the changeable part of md_config_t out. so we can replace the old one with new one on demand, and let different shards share the same unchanged part, amon the other things, the Options map and the lookup tables. that's why we need ConfigValues. we will add a policy template for this class, so we can specialize for Seastar implementation to allow different ConfigProxy instances to point md_config_impl<> to different ConfigValues. because the observer interface is still using md_config_t, to minimise the impact of this change, handle_conf_change() and handle_subsys_change() are not changed. but as it accepts a `const md_config_t`, which cannot be used to create/reference the ConfigProxy holding it, we need to introduce ConfigReader for reading the updated setting from md_config_t in a simpler way, without exposing the internal "values" member variable. Signed-off-by: Kefu Chai <kchai@redhat.com>
* | librados: myaddr -> myaddrsSage Weil2018-07-031-1/+1
| | | | | | | | Signed-off-by: Sage Weil <sage@redhat.com>
* | Merge pull request #22710 from tchaikov/wip-config-without-lockKefu Chai2018-06-271-1/+1
|\ \ | | | | | | | | | | | | | | | common: add lockless `md_config_t` Reviewed-by: Sage Weil <sage@redhat.com> Reviewed-by: Josh Durgin <jdurgin@redhat.com>
| * | common: add LockPolicy to md_config_tKefu Chai2018-06-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | before this change, we guard all read/write access to md_config_t with a lock. after this change, this policy is optional. and is controled by a enum named `LockPolicy`. we will use `md_config_impl<LockPolicy::SINGLE>` to implement the lockless config used by crimson/osd. Signed-off-by: Kefu Chai <kchai@redhat.com>
* | | Merge pull request #22673 from dillaman/wip-24558Mykola Golub2018-06-271-0/+21
|\ \ \ | |/ / |/| | | | | | | | rbd: basic support for images within namespaces Reviewed-by: Mykola Golub <mgolub@suse.com>
| * | librados: add namespace getter to IoCtx APIJason Dillaman2018-06-211-0/+21
| | | | | | | | | | | | Signed-off-by: Jason Dillaman <dillaman@redhat.com>
* | | include/memory.h: remove memory.hKefu Chai2018-06-261-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | memory.h was introduced back when the shared_ptrs were still in TR1, but we've moved to C++17 now. and the C++ clients should be compiled with a C++11 compatible compiler. so there is no need to have this file anymore. also replace all references of ceph::shared_ptr and ceph::weak_ptr with std::shared_ptr and std::weak_ptr accordingly. Signed-off-by: Kefu Chai <kchai@redhat.com>
* | Merge pull request #21999 from myoungwon/wip-manifest-unset-opKefu Chai2018-06-051-0/+6
|\ \ | | | | | | | | | | | | osd, librados: add unset-manifest op Reviewed-by: Sage Weil <sage@redhat.com>