- chan->attr.switch_timer_interval = DEFAULT_KERNEL_CHANNEL_SWITCH_TIMER;
- chan->attr.read_timer_interval = DEFAULT_KERNEL_CHANNEL_READ_TIMER;
- chan->attr.output = DEFAULT_KERNEL_CHANNEL_OUTPUT;
+ chan->attr.switch_timer_interval = DEFAULT_METADATA_SWITCH_TIMER;
+ chan->attr.read_timer_interval = DEFAULT_METADATA_READ_TIMER;;
+
+
+ /*
+ * The metadata channel of kernel sessions must use the "mmap"
+ * back-end since the consumer daemon accumulates complete
+ * metadata units before sending them to the relay daemon in
+ * live mode. The consumer daemon also needs to extract the contents
+ * of the metadata cache when computing a rotation position.
+ *
+ * In both cases, it is not possible to rely on the splice
+ * back-end as the consumer daemon may need to accumulate more
+ * content than can be backed by the ring buffer's underlying
+ * pages.
+ */
+ chan->attr.output = LTTNG_EVENT_MMAP;
+ chan->attr.tracefile_size = 0;
+ chan->attr.tracefile_count = 0;
+ chan->attr.live_timer_interval = 0;