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>
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>
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>
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>
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>
- 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>
- 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>
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>
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>
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>
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>
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>