+struct ctf_fs_ds_index {
+ /* Array of struct ctf_fs_fd_index_entry. */
+ GArray *entries;
+};
+
+struct ctf_fs_ds_file_info {
+ /*
+ * Owned by this. May be NULL.
+ *
+ * A stream cannot be assumed to be indexed as the indexing might have
+ * been skipped. Moreover, the index's fields may not all be available
+ * depending on the producer (e.g. timestamp_begin/end are not
+ * mandatory).
+ *
+ * FIXME In such cases (missing fields), the indexing is aborted as
+ * no the index entries don't have a concept of fields being present
+ * or not.
+ */
+ struct ctf_fs_ds_index *index;
+
+ /* Owned by this. */
+ GString *path;
+
+ /* Guaranteed to be set, as opposed to the index. */
+ int64_t begin_ns;
+};
+
+struct ctf_fs_metadata;
+
+struct ctf_fs_ds_file {
+ /* Weak */
+ struct ctf_fs_metadata *metadata;
+
+ /* Weak */
+ struct bt_self_notification_iterator *pc_notif_iter;
+
+ /* Owned by this */
+ struct ctf_fs_file *file;
+
+ /* Owned by this */
+ struct bt_stream *stream;
+
+ /* Weak */
+ struct bt_notif_iter *notif_iter;
+
+ void *mmap_addr;
+
+ /*
+ * Max length of chunk to mmap() when updating the current mapping.
+ * This value must be page-aligned.
+ */
+ size_t mmap_max_len;
+
+ /* Length of the current mapping. Never exceeds the file's length. */
+ size_t mmap_len;
+
+ /* Offset in the file where the current mapping starts. */
+ off_t mmap_offset;
+
+ /*
+ * Offset, in the current mapping, of the address to return on the next
+ * request.
+ */
+ off_t request_offset;
+
+ bool end_reached;