]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/journal_types.h
Update bcachefs sources to 841a95c29f4c bcachefs: fix userspace build errors
[bcachefs-tools-debian] / libbcachefs / journal_types.h
index 4ffae252e01ed6fd79e3e7a35692e35c66f961b1..38817c7a0851592c67c591f9a7a425d58152a004 100644 (file)
@@ -36,6 +36,7 @@ struct journal_buf {
        bool                    noflush;        /* write has already been kicked off, and was noflush */
        bool                    must_flush;     /* something wants a flush */
        bool                    separate_flush;
+       bool                    need_flush_to_write_buffer;
 };
 
 /*
@@ -181,6 +182,12 @@ struct journal {
         */
        darray_u64              early_journal_entries;
 
+       /*
+        * Protects journal_buf->data, when accessing without a jorunal
+        * reservation: for synchronization between the btree write buffer code
+        * and the journal write path:
+        */
+       struct mutex            buf_lock;
        /*
         * Two journal entries -- one is currently open for new entries, the
         * other is possibly being written out.
@@ -270,6 +277,7 @@ struct journal {
        u64                     low_on_space_start;
        u64                     low_on_pin_start;
        u64                     max_in_flight_start;
+       u64                     write_buffer_full_start;
 
        struct bch2_time_stats  *flush_write_time;
        struct bch2_time_stats  *noflush_write_time;