summaryrefslogtreecommitdiffstats
path: root/src/librados (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
| * | osd,librados: add unset-manifest opmyoungwon oh2018-05-151-0/+6
| | | | | | | | | | | | Signed-off-by: Myoungwon Oh <omwmw@sk.com>
* | | Merge pull request #21775 from Synesis-LLC/fix-23964Kefu Chai2018-06-051-3/+5
|\ \ \ | | | | | | | | | | | | | | | | librados: fix buffer overflow for aio_exec python binding Reviewed-by: Kefu Chai <kchai@redhat.com>
| * | | librados: fix buffer overflow for aio_exec python bindingAleksei Gutikov2018-05-111-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | aio_exec returns ERANGE if provided buffer is not enough. Fixes: https://tracker.ceph.com/issues/23964 Signed-off-by: Aleksei Gutikov <aleksey.gutikov@synesis.ru>
* | | | Merge pull request #21920 from cbodley/wip-async-libradosKefu Chai2018-06-011-189/+86
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | librados: use ceph::async::Completion for asio bindings Reviewed-by: Adam C. Emerson <aemerson@redhat.com> Reviewed-by: Kefu Chai <kchai@redhat.com>
| * | | | librados: use ceph::async::Completion for asio bindingsCasey Bodley2018-05-091-189/+86
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Casey Bodley <cbodley@redhat.com>
* | | | | common/LogEntry: addr -> addrsSage Weil2018-05-281-1/+1
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to switch to an addrvec. This requires multiple parts: - switch the Key type to use just the rank - separate entity_name_t rank - compat encoding - graylog field naming has changed (includes name) - syslog output formatting has changed (includes name) - LogEntry operator<< modified a bit Signed-off-by: Sage Weil <sage@redhat.com>
* | | | core: use const_iterator for decodeKefu Chai2018-05-171-1/+1
| |_|/ |/| | | | | | | | Signed-off-by: Kefu Chai <kchai@redhat.com>
* | | Remove embedded 'cephd' codeDan Mick2018-05-111-5/+0
| | | | | | | | | | | | Signed-off-by: Dan Mick <dan.mick@redhat.com>
* | | librados: fix potential race condition if notify immediately failsJason Dillaman2018-05-091-0/+1
| | | | | | | | | | | | | | | | | | Fixes: http://tracker.ceph.com/issues/23966 Signed-off-by: Jason Dillaman <dillaman@redhat.com> (cherry picked from commit cc06fbab08ef5b7f1b18f2af333c019ad86de03d)
* | | osdc: invoke notify finish context on linger commit failureJason Dillaman2018-05-091-6/+2
|/ / | | | | | | | | | | Fixes: http://tracker.ceph.com/issues/23966 Signed-off-by: Jason Dillaman <dillaman@redhat.com> (cherry picked from commit fcd414f6324136ce0695fcf30a60eec6ff338a98)
* | Merge pull request #21609 from dragonylffly/wip-fix-create-ioctxKefu Chai2018-05-092-2/+15
|\ \ | | | | | | | | | | | | librados: return ENOENT if pool_id invalid Reviewed-by: Josh Durgin <jdurgin@redhat.com>
| * | librados: return ENOENT if pool_id invalidLi Wang2018-05-071-0/+4
| | | | | | | | | | | | Signed-off-by: Li Wang <laurence.liwang@gmail.com>
| * | librados: check latest osdmap for pool_get_nameLi Wang2018-05-072-2/+11
| | | | | | | | | | | | Signed-off-by: Li Wang <laurence.liwang@gmail.com>
* | | librados: timeout on mgr_command()Kefu Chai2018-05-041-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | because the mgrclient will be waiting for the mgrmap if the mgrmap is not available, when the client is about to send a mgr command. and monitor will drop the subscription requests if the client does not have enough cap for reading mon, so unlike mon commands, the client won't get an EACCES return code in this case. in this change, a timeout machinary is introduced. and the client will wait for "rados-mon-op-timeout" before it gives up. if this setting is 0, it will wait forever. Fixes: https://tracker.ceph.com/issues/23627 Signed-off-by: Kefu Chai <kchai@redhat.com>
* | | librados: fix locking on get_required_monitor_featuresJohn Spray2018-05-041-1/+2
| | | | | | | | | | | | | | | | | | | | | This wasn't taking the MonClient lock: should use with_monmap to protect access to MonClient::monmap. Signed-off-by: John Spray <john.spray@redhat.com>
* | | librados: config mgrclient for pre-luminous clusterJohn Spray2018-05-041-0/+5
| | | | | | | | | | | | Signed-off-by: John Spray <john.spray@redhat.com>
* | | Merge pull request #21299 from yanghonggang/pool-createKefu Chai2018-05-041-0/+3
|\ \ \ | |_|/ |/| | | | | | | | librados: Reject the invalid pool create request at client side, rath… Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
| * | librados: Reject the invalid pool create request at client side, rather than ↵Yang Honggang2018-04-091-0/+3
| | | | | | | | | | | | | | | | | | the mon side Signed-off-by: Yang Honggang <yanghonggang@umcloud.com>
* | | Merge pull request #21572 from tchaikov/wip-boost-1.67Kefu Chai2018-04-231-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | cmake,make-dist: bump up boost version to 1.67 Reviewed-by: Casey Bodley <cbodley@redhat.com> Reviewed-by: Willem Jan Withagen <wjw@digiware.nl>
| * | | cmake,make-dist: bump up boost version to 1.67Kefu Chai2018-04-211-1/+1
| | |/ | |/| | | | | | | | | | | | | | | | | | | * to pick up the fix of https://svn.boost.org/trac10/ticket/11622 * also the boost::python's library name now includes the version suffix of python version, so update BuildBoost.cmake accordingly. Signed-off-by: Kefu Chai <kchai@redhat.com>
* | | Merge pull request #20343 from trociny/wip-rados-ordersnapKefu Chai2018-04-211-0/+17
|\ \ \ | |/ / |/| | | | | | | | librados: add OPERATION_ORDERSNAP flag and yet another aio_operate method Reviewed-by: Josh Durgin <jdurgin@redhat.com>
| * | librados: yet another aio_operate methodMykola Golub2018-02-061-0/+15
| | | | | | | | | | | | | | | | | | (allow to specify both flags and snap context) Signed-off-by: Mykola Golub <mgolub@suse.com>
| * | librados: add OPERATION_ORDERSNAP flagMykola Golub2018-02-061-0/+2
| | | | | | | | | | | | Signed-off-by: Mykola Golub <mgolub@suse.com>
* | | librados: add with_reference flag when redirect or chunk is enabledmyoungwon oh2018-04-131-4/+6
| |/ |/| | | | | Signed-off-by: Myoungwon Oh <omwmw@sk.com>
* | librados: extend C API for so it accepts keys with NUL charsPiotr Dałek2018-03-141-39/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Librados C API functions that operate on OMAP accept key values that are NUL-terminated. This makes them unsuitable for operation on keys that have NULs embedded in them (like those produced by librbd). This commit adds new API functions: - rados_omap_get_next2 - rados_write_op_omap_cmp2 - rados_write_op_omap_set2 - rados_write_op_omap_rm_keys2 - rados_read_op_omap_cmp2 - rados_read_op_omap_get_vals_by_keys2 that accept or provide actual key length in bytes and therefore are not limiting key values to first NUL encountered. Signed-off-by: Piotr Dałek <piotr.dalek@corp.ovh.com>
* | librados: fix common_init_finish timingSage Weil2018-03-061-2/+2
| | | | | | | | | | | | | | | | | | | | Common_init_finish does start_service_thread and does set_safe_to_start_threads() on the cct, which switches us to 'runtime' mode where we can't accept many config options. Do that *after* we fetch our config from the mon so that we can accept+set runtime options (and not complain to stderr about it). Signed-off-by: Sage Weil <sage@redhat.com>
* | librados,libcephfs,...: use parse_env()Sage Weil2018-03-061-7/+1
| | | | | | | | Signed-off-by: Sage Weil <sage@redhat.com>
* | common/config: take level to parse_argvSage Weil2018-03-061-1/+1
| | | | | | | | | | | | A few callers are explicitly parsing args from the environment. Signed-off-by: Sage Weil <sage@redhat.com>
* | mon/MonClient: one-shot mon connection on started to fetch configSage Weil2018-03-061-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is not particularly efficient, but it works: - connect to the monitor to get the monmap and config - tear it all down - proceed with normal startup (which presumably involves reconnecting to the mon all over again). This allows us to set config options that may affect the mon communication itself, like ms_type. Signed-off-by: Sage Weil <sage@redhat.com>
* | librados/snap_set_diff: don't assert on empty snapsetMykola Golub2018-02-282-2/+10
| | | | | | | | | | | | Instead treat the diff as a full-object delta. Signed-off-by: Mykola Golub <mgolub@suse.com>
* | librados: make OPERATION_FULL_FORCE the default for rados_remove()Kefu Chai2018-02-221-1/+1
|/ | | | | Fixes: http://tracker.ceph.com/issues/22413 Signed-off-by: Kefu Chai <kchai@redhat.com>
* Merge pull request #20259 from guzhongyan/rados-cleanupKefu Chai2018-02-061-2/+0
|\ | | | | | | | | rados: clean up rados_getxattrs() and rados_striper_getxattrs() Reviewed-by: Sage Weil <sage@redhat.com>
| * rados: clean up rados_getxattrs() and rados_striper_getxattrs()Gu Zhongyan2018-02-021-2/+0
| | | | | | | | Signed-off-by: Gu Zhongyan <guzhongyan@360.cn>
* | librados: invalid free() in rados_getxattrs_next()Gu Zhongyan2018-02-051-1/+4
|/ | | | | | | | | | | | Invalid free() can cause corruption when getting an object attribute with empty value. Check the validity of the pointer before free(). Also move the free() call at the start of rados_getxattrs_next() to avoid memory leak. Fixes: http://tracker.ceph.com/issues/22042 Signed-off-by: Gu Zhongyan <guzhongyan@360.cn>
* librados: getter for min compatible client versionsJason Dillaman2018-01-233-0/+35
| | | | Signed-off-by: Jason Dillaman <dillaman@redhat.com>
* Merge pull request #20028 from mogeb/steady-clock-radosSage Weil2018-01-231-4/+2
|\ | | | | | | | | rados: use WaitInterval()'s return value instead of manual timing Reviewed-by: Sage Weil <sage@redhat.com>
| * rados: use WaitInterval()'s return value instead of manual timingMohamad Gebai2018-01-181-4/+2
| | | | | | | | Signed-off-by: Mohamad Gebai <mgebai@suse.com>
* | Merge pull request #19362 from myoungwon/wip-manifest-rados-op-promoteSage Weil2018-01-221-0/+6
|\ \ | |/ |/| | | | | osd, librados: add a rados op (TIER_PROMOTE) Reviewed-by: Sage Weil <sage@redhat.com>
| * osd,librados: a rados op to promote the object (redirect, chunked)myoungwon oh2018-01-121-0/+6
| | | | | | | | Signed-off-by: Myoungwon Oh <omwmw@sk.com>
* | rados: Switch MIN/MAX for std::min/max and use intarith templatesAdam C. Emerson2018-01-121-2/+2
|/ | | | Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
* librados: Use unqualified encode/decodeAdam C. Emerson2018-01-102-2/+2
| | | | | | This is a portion of the namespace project. Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
* librados: add async interfaces for use with Networking TSCasey Bodley2018-01-091-0/+293
| | | | | | | | | | | | | | | | | | | | | | | | | Defines asynchronous librados operations that satisfy all of the "Requirements on asynchronous operations" imposed by the C++ Networking TS [1] in section 13.2.7. These operations are implemented in terms of boost::asio, but the interfaces themselves are free of boost types - this makes the transition to std::net trivial when it's available. These interfaces conform to the Extensible Asynchronous Model [2] that originated in boost::asio. This model allows the last 'handler' argument to either be a callback that gets the result, a coroutine yield_context that will suspend until completion, or a 'use_future' tag to request the result in a std::future (see the unit tests for examples of each). The 'Extensible' part also enables further integration with new frameworks. For now, only async_read(), async_write(), and the read/write variants of async_operate() are provided. [1] Working Draft, C++ Extensions for Networking http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/n4711.pdf [2] "Library Foundations for Asynchronous Operations" http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3896.pdf Signed-off-by: Casey Bodley <cbodley@redhat.com>
* cmake: pass static linkflags to the linker who links libcommonKefu Chai2018-01-041-4/+8
| | | | Signed-off-by: Kefu Chai <kchai@redhat.com>
* common: add eventtrace support for librbdMahati Chamarthy2017-12-011-12/+12
| | | | | | ... and add some basic eventtrace calls to librbd module Signed-off-by: Mahati Chamarthy <mahati.chamarthy@intel.com>
* Merge pull request #15482 from myoungwon/wip-chunked-manifestSage Weil2017-11-301-0/+11
|\ | | | | | | | | osd,librados: add manifest, operations for chunked object Reviewed-by: Sage Weil <sage@redhat.com>
| * osd,librados: a rados op to create chunked objectmyoungwon oh2017-11-021-0/+11
| | | | | | | | Signed-off-by: Myoungwon Oh <omwmw@sk.com>
* | Merge pull request #18509 from tchaikov/wip-osd-cleanupsSage Weil2017-11-013-6/+6
|\ \ | | | | | | | | | | | | osd,mgrclient: pass daemon_status by rvalue ref and other cleanups Reviewed-by: John Spray <john.spray@redhat.com>
| * | rados,mgr: pass daemon_status by rvalue referenceKefu Chai2017-10-243-6/+6
| |/ | | | | | | Signed-off-by: Kefu Chai <kchai@redhat.com>
* / cmake: remove rados_a targetKefu Chai2017-10-271-7/+5
|/ | | | | | rados_a is librados.a, which is not neeeded anymore. Signed-off-by: Kefu Chai <kchai@redhat.com>
* cmake: use CXX_VISIBILITY_PRESET and VISIBILITY_INLINES_HIDDENKefu Chai2017-10-131-4/+2
| | | | | | | instead of using "-fvisibility=hidden -fvisibility-inlines-hidden", more cmake-ish this way. Signed-off-by: Kefu Chai <kchai@redhat.com>