.. | .. |
---|
103 | 103 | /* Embedded in struct cache_set */ |
---|
104 | 104 | struct journal { |
---|
105 | 105 | spinlock_t lock; |
---|
| 106 | + spinlock_t flush_write_lock; |
---|
| 107 | + bool btree_flushing; |
---|
| 108 | + bool do_reserve; |
---|
106 | 109 | /* used when waiting because the journal was full */ |
---|
107 | 110 | struct closure_waitlist wait; |
---|
108 | 111 | struct closure io; |
---|
.. | .. |
---|
154 | 157 | struct bio_vec bv[8]; |
---|
155 | 158 | }; |
---|
156 | 159 | |
---|
| 160 | +#define BTREE_FLUSH_NR 8 |
---|
| 161 | + |
---|
157 | 162 | #define journal_pin_cmp(c, l, r) \ |
---|
158 | 163 | (fifo_idx(&(c)->journal.pin, (l)) > fifo_idx(&(c)->journal.pin, (r))) |
---|
159 | 164 | |
---|
.. | .. |
---|
178 | 183 | |
---|
179 | 184 | void bch_journal_free(struct cache_set *c); |
---|
180 | 185 | int bch_journal_alloc(struct cache_set *c); |
---|
| 186 | +void bch_journal_space_reserve(struct journal *j); |
---|
181 | 187 | |
---|
182 | 188 | #endif /* _BCACHE_JOURNAL_H */ |
---|