X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttng-abi.c;h=478a5912f89a0ebee71185885119bd3d85e1aff1;hb=2aa1301314bd42132f49b8ebffc614bea9575540;hp=87465189060edd4122cc9f8c5ad87c3fe218b6f1;hpb=96c55c2f6b20fd742b3ea2aa291c28e140df82d8;p=lttng-modules.git diff --git a/lttng-abi.c b/lttng-abi.c index 87465189..478a5912 100644 --- a/lttng-abi.c +++ b/lttng-abi.c @@ -569,6 +569,8 @@ long lttng_session_ioctl(struct file *file, unsigned int cmd, unsigned long arg) return lttng_session_list_tracker_pids(session); case LTTNG_KERNEL_SESSION_METADATA_REGEN: return lttng_session_metadata_regenerate(session); + case LTTNG_KERNEL_SESSION_STATEDUMP: + return lttng_session_statedump(session); default: return -ENOIOCTLCMD; } @@ -702,6 +704,18 @@ long lttng_metadata_ring_buffer_ioctl(struct file *filp, return put_u64(stream->version, arg); } + case RING_BUFFER_SNAPSHOT: + { + /* + * Force the buffer to quiescent so the ring buffer + * don't attempt to perform a SWITCH_FLUSH, which would + * desynchronize the client accounting of the amount of + * data available in the buffer from the ring buffer + * view. + */ + buf->quiescent = true; + break; + } default: break; } @@ -778,6 +792,18 @@ long lttng_metadata_ring_buffer_compat_ioctl(struct file *filp, return put_u64(stream->version, arg); } + case RING_BUFFER_SNAPSHOT: + { + /* + * Force the buffer to quiescent so the ring buffer + * don't attempt to perform a SWITCH_FLUSH, which would + * desynchronize the client accounting of the amount of + * data available in the buffer from the ring buffer + * view. + */ + buf->quiescent = true; + break; + } default: break; } @@ -972,8 +998,11 @@ int lttng_abi_open_metadata_stream(struct file *channel_file) goto notransport; } - if (!lttng_kref_get(&session->metadata_cache->refcount)) + if (!lttng_kref_get(&session->metadata_cache->refcount)) { + ret = -EOVERFLOW; goto kref_error; + } + ret = lttng_abi_create_stream_fd(channel_file, stream_priv, <tng_metadata_ring_buffer_file_operations); if (ret < 0)