diff options
| author | Kent Overstreet <[email protected]> | 2025-04-05 23:30:43 +0000 |
|---|---|---|
| committer | Kent Overstreet <[email protected]> | 2025-05-22 00:14:02 +0000 |
| commit | a17e985be9831bf866795fe5e3da219d2061ce6c (patch) | |
| tree | 79a5db50e9052248fbafcd769fd6deb565844ab9 /fs/bcachefs/btree_write_buffer.c | |
| parent | bcachefs: alphabetize init function calls (diff) | |
| download | kernel-a17e985be9831bf866795fe5e3da219d2061ce6c.tar.gz kernel-a17e985be9831bf866795fe5e3da219d2061ce6c.zip | |
bcachefs: Move various init code to _init_early()
_init_early() is for initialization that cannot fail, and often must
happen for teardown partway through initialization to work.
Signed-off-by: Kent Overstreet <[email protected]>
Diffstat (limited to 'fs/bcachefs/btree_write_buffer.c')
| -rw-r--r-- | fs/bcachefs/btree_write_buffer.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/bcachefs/btree_write_buffer.c b/fs/bcachefs/btree_write_buffer.c index 0941fb2c026d..68ab48af40f0 100644 --- a/fs/bcachefs/btree_write_buffer.c +++ b/fs/bcachefs/btree_write_buffer.c @@ -866,13 +866,18 @@ void bch2_fs_btree_write_buffer_exit(struct bch_fs *c) darray_exit(&wb->inc.keys); } -int bch2_fs_btree_write_buffer_init(struct bch_fs *c) +void bch2_fs_btree_write_buffer_init_early(struct bch_fs *c) { struct btree_write_buffer *wb = &c->btree_write_buffer; mutex_init(&wb->inc.lock); mutex_init(&wb->flushing.lock); INIT_WORK(&wb->flush_work, bch2_btree_write_buffer_flush_work); +} + +int bch2_fs_btree_write_buffer_init(struct bch_fs *c) +{ + struct btree_write_buffer *wb = &c->btree_write_buffer; /* Will be resized by journal as needed: */ unsigned initial_size = 1 << 16; |
