hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/drivers/md/bcache/journal.h
....@@ -103,6 +103,9 @@
103103 /* Embedded in struct cache_set */
104104 struct journal {
105105 spinlock_t lock;
106
+ spinlock_t flush_write_lock;
107
+ bool btree_flushing;
108
+ bool do_reserve;
106109 /* used when waiting because the journal was full */
107110 struct closure_waitlist wait;
108111 struct closure io;
....@@ -154,6 +157,8 @@
154157 struct bio_vec bv[8];
155158 };
156159
160
+#define BTREE_FLUSH_NR 8
161
+
157162 #define journal_pin_cmp(c, l, r) \
158163 (fifo_idx(&(c)->journal.pin, (l)) > fifo_idx(&(c)->journal.pin, (r)))
159164
....@@ -178,5 +183,6 @@
178183
179184 void bch_journal_free(struct cache_set *c);
180185 int bch_journal_alloc(struct cache_set *c);
186
+void bch_journal_space_reserve(struct journal *j);
181187
182188 #endif /* _BCACHE_JOURNAL_H */