Fix: SIGBUS error on reading past a file's end in mmap'ed region
[babeltrace.git] / plugins / ctf / fs / fs.h
index 151e28eda5d5c2d8f8f801e9ff5523e8a1509e91..cf574c8b3c32462ec5bb98e0d8f1a541dea6308d 100644 (file)
@@ -60,8 +60,18 @@ struct ctf_fs_stream {
        /* FIXME There should be many and ctf_fs_stream should not own them. */
        struct bt_ctf_notif_iter *notif_iter;
        void *mmap_addr;
+       /* Max length of chunk to mmap() when updating the current mapping. */
+       size_t mmap_max_len;
+       /* Length of the current mapping. */
        size_t mmap_len;
+       /* Length of the current mapping which *exists* in the backing file. */
+       size_t mmap_valid_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;
 };
This page took 0.025464 seconds and 4 git commands to generate.