]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/bcachefs.h
Update bcachefs sources to 3e0c5b0722 fixup! bcachefs: Btree write buffer
[bcachefs-tools-debian] / libbcachefs / bcachefs.h
index f513173375803718021a6e65afebcafcae73d790..c8620127f1aef8f3ceb081ad634837d885a2b677 100644 (file)
@@ -316,7 +316,10 @@ do {                                                                       \
                "done in memory")                                       \
        BCH_DEBUG_PARAM(verify_all_btree_replicas,                      \
                "When reading btree nodes, read all replicas and "      \
-               "compare them")
+               "compare them")                                         \
+       BCH_DEBUG_PARAM(backpointers_no_use_write_buffer,               \
+               "Don't use the write buffer for backpointers, enabling "\
+               "extra runtime checks")
 
 /* Parameters that should only be compiled in debug mode: */
 #define BCH_DEBUG_PARAMS_DEBUG()                                       \
@@ -393,6 +396,7 @@ enum bch_time_stats {
 
 #include "alloc_types.h"
 #include "btree_types.h"
+#include "btree_write_buffer_types.h"
 #include "buckets_types.h"
 #include "buckets_waiting_for_journal_types.h"
 #include "clock_types.h"
@@ -581,6 +585,7 @@ struct btree_transaction_stats {
        struct bch2_time_stats  lock_hold_times;
        struct mutex            lock;
        unsigned                nr_max_paths;
+       unsigned                wb_updates_size;
        unsigned                max_mem;
        char                    *max_paths_text;
 };
@@ -775,6 +780,9 @@ struct bch_fs {
        struct workqueue_struct *btree_interior_update_worker;
        struct work_struct      btree_interior_update_work;
 
+       struct list_head        pending_node_rewrites;
+       struct mutex            pending_node_rewrites_lock;
+
        /* btree_io.c: */
        spinlock_t              btree_write_error_lock;
        struct btree_write_stats {
@@ -795,6 +803,8 @@ struct bch_fs {
        struct btree_key_cache  btree_key_cache;
        unsigned                btree_key_cache_btrees;
 
+       struct btree_write_buffer btree_write_buffer;
+
        struct workqueue_struct *btree_update_wq;
        struct workqueue_struct *btree_io_complete_wq;
        /* copygc needs its own workqueue for index updates.. */