Commit Graph

168 Commits

Author SHA1 Message Date
Kefu Chai
c2d6788aaa librados: add rados_aio_create_completion2()
rados_aio_create_completion2() is almost identical to
rados_aio_create_completion(). the only difference is that the former
does not accept the `safe` callback. as it's an alias of `complete`
callback since af01db76f6

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-11-01 09:40:44 +08:00
Sage Weil
85736b784a librados: add rados_mgr_command_target
This variant lets you specify which mgr to talk to.

Signed-off-by: Sage Weil <sage@redhat.com>
2019-10-01 16:30:53 -05:00
Samuel Just
4d272b98c5 bluestore: revamp tracepoints, add sampling
This patch adds per-io bluestore specific tracepoints detailing the
throttle state at queue time as well as state latencies during
execution.  Additionally, bluestore_throttle_trace_rate will limit
the rate at which ios have tracepoints emitted.

Signed-off-by: Samuel Just <sjust@redhat.com>
2019-09-27 15:55:18 -07:00
Samuel Just
670e00a06a */CMakeLists: add EVENTTRACE as cmakedefine, require LTTNG
Because EVENTTRACE now implies LTTNG, also cleanup EVENTTRACE
conditions to assume LTTNG.

Also add missing eventtrace dependencies to rbd and
test/objectstore.

Signed-off-by: Samuel Just <sjust@redhat.com>
2019-09-27 15:55:18 -07:00
Casey Bodley
e8c320f5d9 librados: add rados_write_op_omap_rm_range2()
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2019-08-06 15:21:16 -04:00
Casey Bodley
8da8f357e7 tracing: add do_osd_op_pre_omaprmkeyrange
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2019-08-06 15:21:16 -04:00
Nathan Cutler
6cb395cf0b cmake: revert librados_tp.so version from 3 to 2
Post-mortem analysis:

librados.so and librados_tp.so are packaged together in the librados2
RPM.

c680fb10f5 bumped
the librados.so and librados_tp.so versions from 2 to 3.

Later, 7bf6b5ee12 reverted the librados.so
version from 3 to 2, but left the librados_tp.so version at 3.

Fixes: http://tracker.ceph.com/issues/39291
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2019-04-16 13:56:35 +02:00
Mykola Golub
a96feac2e4 librbd: online re-sparsify of images
Signed-off-by: Mykola Golub <mgolub@suse.com>
2019-02-15 11:12:00 +00:00
Theofilos Mouratidis
b6f9aab037 librbd: add trash purge api calls
Add trash purge api calls and fix the docs of some other rbd trash functions

Signed-off-by: Theofilos Mouratidis <mtheofilos@gmail.com>
2019-01-11 09:18:45 -05:00
Kefu Chai
0e5bdd9d56 librados: remove rados_tmap_*
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>
2018-11-07 14:05:25 -08:00
Kefu Chai
c680fb10f5 cmake: bump librados so version
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-11-02 00:15:31 +08:00
Mykola Golub
ad9fc49776
Merge pull request #23896 from Songweibin/wip-group-snap-rollback
rbd: add group snap rollback method

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Mykola Golub <mgolub@suse.com>
2018-09-13 19:35:10 +03:00
songweibin
680e86e6fb librbd: add group snap rollback method
Fixes: http://tracker.ceph.com/issues/23550

Signed-off-by: songweibin <song.weibin@zte.com.cn>
2018-09-12 23:42:14 +08:00
Sage Weil
1a80ba0636 os: implement merge_collection
Signed-off-by: Sage Weil <sage@redhat.com>
2018-09-07 12:07:56 -05:00
Julien Collet
809c5430c2 librbd: add image access/last modified timestamps
Add access and modify timestamps and associated tests
to RBD images.

Access (resp. modify) timestamps are updated on
read (resp. write) operations. A configurable throttling
mechanism is implemented (default to 60s).

Signed-off-by: Julien Collet <julien.collet@cern.ch>
2018-08-21 16:17:17 -04:00
Mykola Golub
119c7ea66b librbd: API for image migration
Signed-off-by: Mykola Golub <mgolub@suse.com>
2018-08-14 18:29:45 -04:00
Jason Dillaman
53463d592d librados: add namespace getter to IoCtx API
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2018-06-21 08:33:17 -04:00
Yang Honggang
6930e9f3ca lttng: Trace rgw data transfer, bi entry and object header update processes
Signed-off-by: Yang Honggang <joseph.yang@xtaotech.com>
2018-03-20 14:15:50 +08:00
songweibin
666181860f librbd: add group rename methods
Signed-off-by: songweibin <song.weibin@zte.com.cn>
2018-02-26 10:21:58 +08:00
Victor Denisov
c4f2eb4adb librbd: Add group snap rename method
Signed-off-by: Victor Denisov <denisovenator@gmail.com>
2018-01-13 14:00:30 -05:00
Jason Dillaman
2f838104d8 librbd: added missing C API version for rbd_snap_get_group_namespace
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2018-01-11 10:38:23 -05:00
Victor Denisov
c7c7e5a75c librbd: Add group snapshot operations
Signed-off-by: Victor Denisov <denisovenator@gmail.com>
2018-01-11 10:38:23 -05:00
Adam Wolfe Gordon
97d4cbb149 librbd: Add support for listing image watchers
This allows API clients to fetch a list like the one produced by the
'rbd status' command.

Signed-off-by: Adam Wolfe Gordon <awg@digitalocean.com>
2017-11-27 16:31:39 +00:00
Mykola Golub
97db2b2a4c librbd: add deep_copy function to API
Signed-off-by: Mykola Golub <to.my.trociny@gmail.com>
2017-11-06 10:29:44 +02:00
amitkuma
c150aedb96 os:startsync can be removed
client is still sending write,startsync which is deprecated long back. Hence cleaning up OP_STARTSYNC

Fixes: http://tracker.ceph.com/issues/20604
Signed-off-by: Amit Kumar <amitkuma@redhat.com>
2017-07-28 17:04:03 +05:30
Kefu Chai
2531063c30 Merge pull request #16574 from batrick/rgw-rbd-stripped-build
CMakeLists: trim rbd/rgw forced dependencies

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-07-27 13:10:07 +08:00
wangzhengyong
e70d48933c librbd: add compare_and_write/aio_compare_and_write API
Signed-off-by: Zhengyong Wang <wangzhengyong@cmss.chinamobile.com>
2017-07-26 08:00:06 -04:00
Patrick Donnelly
491cf4eaf0
CMakeLists: trim rbd/rgw accidental dependencies
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-07-25 15:33:42 -07:00
runsisi
0358f29c9d librbd: add create timestamp metadata for image
Signed-off-by: runsisi <runsisi@zte.com.cn>
2017-06-20 13:52:06 +08:00
Sage Weil
241683e01c librados: add rados_monitor_log2 that includes EntityName
Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-31 14:39:55 -04:00
Mohamad Gebai
021dcf7bfb tracing: add documentation for function instrumentation
Signed-off-by: Mohamad Gebai <mgebai@suse.com>
2017-05-25 15:16:21 -04:00
Mohamad Gebai
73ab6c2d13 tracing: add -finstrument-functions for OSD
Signed-off-by: Mohamad Gebai <mgebai@suse.com>
2017-05-25 15:16:21 -04:00
Mohamad Gebai
27fe5320bb tracing: add cyg_profile tracepoint provider
Signed-off-by: Mohamad Gebai <mgebai@suse.com>
2017-05-25 15:16:21 -04:00
Jason Dillaman
4b48b9fe68 librbd: extended parent info API to retrieve parent id
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-05-01 10:10:13 -04:00
wangzhengyong
0ccebc5c9b librados: add cmpext API
The compare-extent (cmpext) operation allows callers to compare existing
object contents with an arbitrary buffer. cmpext requests can be
compounded with read and write operations, allowing for atomic object
content updates. return 0 on success, negative error code
on failure, (-MAX_ERRNO - mismatch_off) on mismatch

This commit is based on Mike Christie's initial C++ API, with the
addition of AIO support and a C API. Response marshalling was also
reworked, so that the miscompare offset is unmarshalled transparently to
the caller.

Signed-off-by: Zhengyong Wang <wangzhengyong@cmss.chinamobile.com>
Signed-off-by: David Disseldorp <ddiss@suse.de>
2017-04-26 09:10:28 +08:00
wangzhengyong
bfc334b537 ceph osd: add support for new op cmpext
This adds support for a new op cmpext. The request will read
extent.length bytes and compare them to extent.length bytes at
extent.offset on disk. return 0 on success, negative error code
on failure, (-MAX_ERRNO - mismatch_off) on mismatch

rbd will use this in a multi op request to implement the
SCSI COMPARE_AND_WRITE request which is used by VMware for
its atomic test and set request.

Signed-off-by: Zhengyong Wang <wangzhengyong@cmss.chinamobile.com>
Signed-off-by: Mike Christie <mchristi@redhat.com>
[ddiss@suse.de: ReplicatedPG -> PrimaryLogPG]
Reviewed-by: David Disseldorp <ddiss@suse.de>
2017-04-26 09:08:22 +08:00
Jason Dillaman
fcb42c7076 librados: expose new checksum osd operation
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-04-17 22:54:27 -04:00
Jason Dillaman
2f4b8c0cf9 osd: new op for retrieving an extent checksum
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-04-17 22:54:21 -04:00
Ricardo Dias
9438ee9353
librbd: added group image remove by id to API
Signed-off-by: Ricardo Dias <rdias@suse.com>
2017-04-11 12:09:41 +01:00
Ricardo Dias
b70dbccb67
librbd: added trash methods to API
Signed-off-by: Ricardo Dias <rdias@suse.com>
2017-04-11 12:09:41 +01:00
Mohamad Gebai
22875e50cb cmake: build tracepoint libraries for vstart target
Avoid a segfault in TracepointProvider::verify_config() when building
for the 'vstart' target. TracepointProvider tries to load the tracepoint
providers libraries at runtime, but these aren't built as part of the
'vstart' target.

Signed-off-by: Mohamad Gebai <mgebai@suse.com>
2017-04-06 08:34:28 -04:00
yaoning
a7dd9f1816 librbd: add sparse copy support
Fixes: fix issue #15648
http://tracker.ceph.com/issues/15648

Signed-off-by: yaoning <yaoning@unitedstack.com>
2017-04-04 03:18:52 +00:00
Sage Weil
3f5269d8b5 Merge pull request #13323 from yehudasa/wip-18079-2
librados: use cursor for nobjects listing

Reviewed-by: Sage Weil <sage@redhat.com>
2017-03-07 08:41:08 -06:00
Yehuda Sadeh
152159fce4 librados: nobjects list get and seek to cursor
cursor is of ObjectCursor type

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2017-03-01 14:49:12 -08:00
Gui Hecheng
4014bae7bf librbd: implement writesame API
Based on pr: https://github.com/ceph/ceph/pull/10019.
This drops the original writesame2 api.

Signed-off-by: Gui Hecheng <guihecheng@cmss.chinamobile.com>
Signed-off-by: Mingxin Liu <mingxin@xsky.com>
2017-02-23 17:25:19 +08:00
Pan Liu
9debf5c98a librbd: support to list snapshot time stamp
Fixes: http://tracker.ceph.com/issues/808
Signed-off-by: Pan Liu <pan.liu@istuary.com>
2017-01-31 03:18:32 +08:00
Sage Weil
7495487e56 Merge pull request #13008 from athanatos/wip-clone-range
osd,librados: remove clone_range and associated multi-object cruft

Reviewed-by: Sage Weil <sage@redhat.com>
2017-01-22 10:41:55 -06:00
Yehuda Sadeh
5c5147efdf Merge pull request #12492 from yehudasa/wip-func-oid-tracing
osd, messenger, librados: lttng oid tracing

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2017-01-18 15:19:21 -08:00
Ricardo Dias
235448879e
cmake: fix rpath on shared libraries and executables
The problem was due to the attempt of CMake to rewrite the RPATH of
the executables, or shared libraries, that didn't have any RPATH linked
during the building phase.

Currently INSTALL_RPATH is already set for all binaries. This patch
sets an empty INSTALL_RPATH for all binaries that don't depend on
any internal (also being built) target.

Signed-off-by: Ricardo Dias <rdias@suse.com>
2017-01-18 12:40:41 +00:00
Samuel Just
0d7b0b7b52 src/: remove CLONE_RANGE, ASSERT_SRC_VERSION, SRC_CMPXATTR
These greatly complicate the osd implementation and appear unused.

Signed-off-by: Samuel Just <sjust@redhat.com>
2017-01-17 09:41:23 -08:00