Commit Graph

52 Commits

Author SHA1 Message Date
Jason Dillaman
7cff359188 librbd: add update_features to librbd API
Allow mutable features to be enabled / disabled.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-04-06 13:14:34 -04:00
Haomai Wang
da9a057216 librbd: Add metadata_get method to support single metadata key retrieve
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2015-03-13 22:52:42 +08:00
Haomai Wang
c983c3cf86 librbd: Add librbd interface impl and tracing for metadata
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2015-03-13 22:51:34 +08:00
Sage Weil
f928f68347 Merge remote-tracking branch 'gh/wip-assert-version'
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2015-02-05 02:18:06 -08:00
Jason Dillaman
706a6552cf librbd: added get_flags API methods
Exposed the RBD image flags bitmask through the API via
new methods in the C/C++/Python RBD APIs.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-02-02 23:24:09 -05:00
Sage Weil
7590387ea8 librados: add missing tracepoints
Signed-off-by: Sage Weil <sage@redhat.com>
2015-02-02 02:46:10 -08:00
Jason Dillaman
fa96bb4db4 librbd: Stub out new exclusive image feature
When an image is flagged with the exclusive feature, only a
single client can modify the image.  This is groundwork for
an RBD object map optimization and for RBD mirroring.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-01-07 21:25:04 -05:00
Josh Durgin
6fd348fe43 Merge remote-tracking branch 'origin/wip-10270' into master
Reviewed-by: Josh Durgin <jdurgin@redhat.com>

Conflicts:
	src/librados/IoCtxImpl.cc
	src/librados/IoCtxImpl.h
2015-01-06 15:24:14 -08:00
Sage Weil
4ebd4b4280 librados: add rados_watch_flush() call
Add a call so that callers can make sure all queued callbacks have
completed before shutting down the ioctx.  This avoids a segv triggered
by the LibRadosWatchNotifyPPTests/LibRadosWatchNotifyPP.WatchNotify2Timeout/1
test due to the ioctx being destroyed when the in-progress callback
does a notify_ack.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-20 12:12:33 -08:00
Sage Weil
f8d37a2cc4 Merge remote-tracking branch 'gh/master' into wip-watch-notify
Conflicts:
	PendingReleaseNotes

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Josh During <jdurgin@redhat.com>
2014-12-16 14:02:32 -08:00
Jason Dillaman
f79b7fe451 librados: Added new API methods to create an ioctx by pool id
A new pool_list method includes the unique pool id for all pools.
This pool id can be used with the new rados_ioctx_create2 /
ioctx_create methods to create an ioctx by pool id instead of
by pool name.  Creating ioctx's by pool id helps avoid certain
race conditions when pools are renamed or deleted.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2014-12-13 04:37:55 -05:00
Sage Weil
cf2113eb38 Merge remote-tracking branch 'gh/master' into wip-librados-fadvise
Conflicts:
	src/test/librbd/test_librbd.cc
2014-12-12 13:09:45 -08:00
Jianpeng Ma
5896f99751 librbd: add new read/write api for librbd C interface which handle op
flags.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2014-12-12 14:23:35 +08:00
Noah Watkins
d92e2cafee lttng: add int type definitions
The normal path through #include <lttng/tracepoint.h> doesn't
appear to include int defintions like uint64_t that are used
in Ceph so we add our definitions file.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2014-12-10 18:48:43 -07:00
Sage Weil
03778502c2 librados: watch_check() to check on status of watch
Return either an accumulated error code, or the time since the watch was
last confirmed.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-04 10:34:04 -08:00
Sage Weil
42e4baa06a librados: unwatch doesn't need the oid argument
The handle is like a file handle: there is internal state that is getting
freed and the user needn't provide it again.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-04 10:34:04 -08:00
Sage Weil
73720130c3 librados: use new watch op codes; simplify Objecter helpers
- drop the useless add_watch() helper; do it explicitly
- drop the unused var arg everywhere
- make a separate notify member of the union that excludes
  the other unused fields

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-04 10:32:37 -08:00
Sage Weil
7e0c4efcd4 librados: define updated watch/notify interface
- new notify callback with the correct values:
  - notify_id
  - watch handle
  - payload
- new notify_ack call
  - not implicit when the callback returns (for new api only)
  - optional payload
- new watch2 call
  - that provides the new callback
- new notify2 call
  - with the right arguments, and optional timeout

A couple refactors in here:
- IoCtx notify_ack is now called unlocked (Note: this will soon change
  with pending Objecter locking changes)
- Objecter notify_ack takes a buffer

TODO:
- no timeout on the individual watch, yet...

Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-04 10:32:37 -08:00
Sage Weil
bebcd1462b librados: drop create category args
Signed-off-by: Sage Weil <sage@redhat.com>
2014-12-01 09:36:12 -08:00
Sage Weil
22b6c1a531 Merge pull request #2124 from ceph/wip-objectstore
simplify ObjectStore interface

sage-2014-11-11_08:26:01-rados-wip-sage-testing-distro-basic-multi

Reviewed-by: Haomai Wang <haomaiwang@gmail.com>
Reviewed-by: Samuel Just <sjust@redhat.com>
2014-11-12 10:02:52 -08:00
Sage Weil
b90b483084 remove collection_rename
No more users!  Complicated semantics!

Signed-off-by: Sage Weil <sage@redhat.com>
2014-10-27 16:59:30 -07: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
Adam Crume
d8ae14f489 librados: Add rados_pool_get_base_tier call
Fixes: #8188
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-10-01 09:40:34 -07:00
Adam Crume
398ebc0b84 librbd: Add missing tracepoints
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-09-11 16:48:03 -07:00
Adam Crume
7531b280e1 lttng: Fix 'make tag' when configured --without-lttng
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-09-08 09:16:51 -07:00
Adam Crume
e419ba60f5 lttng: Don't build trace libraries when lttng is disabled
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-08-21 10:57:34 -07:00
Adam Crume
a35b5d2c1b lttng: Don't build trace headers when lttng is disabled
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-08-21 10:57:34 -07:00
Adam Crume
861e6a3920 lttng: Update packaging
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-08-21 10:57:34 -07:00
Adam Crume
edddb3fae6 lttng: Fix "make distcheck"
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-08-21 10:57:33 -07:00
Adam Crume
8d71b6c183 lttng: Remove tracing from libcommon
This is a short-term fix for issues caused by tracepoints in libcommon.
Code crashes at runtime if the same tracepoints are linked into the
program multiple times.  This happens with libcommon because it is
statically linked into dynamic libraries such as librados, then
statically linked into executables because symbols from libcommon are
not exposed in librados.  Therefore, any programs that use librados and
libcommon would crash because of duplicate tracepoints.

Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-08-21 10:57:33 -07:00
Adam Crume
18c081e54a rbd-replay: Remove extent tracepoints and inline extents
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-08-21 10:57:33 -07:00
Adam Crume
e555867eef rbd-replay: Move tracepoints from internal.cc to librbd.cc
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-08-21 10:57:33 -07:00
Adam Crume
684643a39d lttng: Fix ceph_ctf_stringp
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-08-21 10:57:32 -07:00
Adam Crume
e22f59f7f3 rbd-replay: Support replaying partial traces
Tracing may start after the application is started, and image open calls
may missed. To support replaying these traces, additional information is
traced, allowing missing open calls to be generated.

Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-08-21 10:57:32 -07:00
Adam Crume
2a11a5cc92 lttng: Disable LTTng by default, add --with-lttng configure option
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-08-21 10:57:31 -07:00
Adam Crume
4109879f4e lttng: Default to not storing buffer content
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-08-21 10:57:31 -07:00
Adam Crume
f625775872 lttng: Add more tracing to librbd
Includes:
- aio_complete
- aio_discard
- aio_flush
- aio_get_return_value
- aio_is_complete
- aio_read
- aio_wait_for_complete
- aio_write
- copy
- discard
- flush
- invalidate_cache
- rename
- resize
- Add ImageCtx pointer to trace points
- Add snap_name and readonly flag to trace point open_image_enter

Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-08-21 10:57:29 -07:00
Noah Watkins
e9b39d918f tracing: instrument filestore
This adds objectstore tracepoints for the filestore. It'd be nice to add
these to the objectstore interface some how so we can get all
implementations for free, but that might just be a bit difficult
especially since each impl will apply transactions in a differnet way.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2014-08-21 10:57:29 -07:00
Adam Crume
d0834bb841 lttng: Basic tracing of librbd
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-08-21 10:57:28 -07:00
Adam Crume
772148e25d lttng: Remove 'ver' from trace in code for CEPH_OSD_OP_NOTIFY
'ver' is obsolete and variable exists only for proper deserialization

Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-08-21 10:57:28 -07:00
Adam Crume
e1e157fba2 lttng: Split up libtracepoints
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-08-21 10:57:28 -07:00
Adam Crume
00b2ec6f21 lttng: Prevent deletion of tracing-common.h when cleaning
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-08-21 10:57:28 -07:00
Adam Crume
012ff2956b lttng: Prevent creation of incorrect .o files when generating from .tp
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-08-21 10:57:28 -07:00
Adam Crume
16cd0744f5 lttng: Trace librados C API
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-08-21 10:57:28 -07:00
Adam Crume
fcf49257f0 lttng: Add tracing-common.h
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-08-21 10:57:28 -07:00
Adam Crume
e312be618f lttng: Trace ReplicatedPG::do_osd_ops
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-08-21 10:57:28 -07:00
Adam Crume
1802bc2535 lttng: Add rmw_flags to tracepoint in PG::queue_op
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-08-21 10:57:27 -07:00
Adam Crume
ae5994644c lttng: Trace OpRequest
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-08-21 10:57:27 -07:00
Noah Watkins
33b87f9227 tracing: automake-ify tracepoint generation
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2014-08-21 10:57:27 -07:00
Noah Watkins
3ac99e3f72 lttng: add pg and osd tracepoints
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2014-08-21 10:57:27 -07:00