- uint64_t metadata_received;
- uint64_t metadata_sent;
- struct relay_stream *metadata_stream;
+ struct relay_viewer_stream *viewer_metadata_stream; /* RCU protected */
+
+ /*
+ * Relay streams associated with this ctf trace.
+ * Updates are protected by the stream_list lock.
+ * Traversals are protected by RCU.
+ */
+ struct cds_list_head stream_list;
+ pthread_mutex_t stream_list_lock;
+
+ /*
+ * Node within session trace hash table. Node is indexed by
+ * stream path name.
+ */
+ struct lttng_ht_node_str node;
+ struct rcu_head rcu_node; /* For call_rcu teardown. */
+
+ /*
+ * True if the metadata stream of this trace was sent the viewer in the
+ * past.
+ */
+ bool metadata_stream_sent_to_viewer;