Version 2.7.7
[lttng-modules.git] / lttng-abi.c
index 9845930d9ebc87bd7e86f0c0bd06eb95317d66da..9400f5374aad7ce1510e7db59bcc423568b50448 100644 (file)
@@ -684,6 +684,18 @@ long lttng_metadata_ring_buffer_ioctl(struct file *filp,
                        goto err;
                break;
        }
+       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;
        }
@@ -739,6 +751,33 @@ long lttng_metadata_ring_buffer_compat_ioctl(struct file *filp,
                 */
                return -ENOSYS;
        }
+       case RING_BUFFER_FLUSH:
+       {
+               struct lttng_metadata_stream *stream = filp->private_data;
+               struct lib_ring_buffer *buf = stream->priv;
+               struct channel *chan = buf->backend.chan;
+
+               /*
+                * Before doing the actual ring buffer flush, write up to one
+                * packet of metadata in the ring buffer.
+                */
+               ret = lttng_metadata_output_channel(stream, chan);
+               if (ret < 0)
+                       goto err;
+               break;
+       }
+       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;
        }
This page took 0.026266 seconds and 4 git commands to generate.