Fix: don't perform extra flush on metadata channel
[lttng-modules.git] / lttng-abi.c
index 87465189060edd4122cc9f8c5ad87c3fe218b6f1..4dd9273f1eb9a0551d343dfd7706b0893f45fb2d 100644 (file)
@@ -702,6 +702,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 +790,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;
        }
This page took 0.023067 seconds and 4 git commands to generate.