diff options
| author | Kent Overstreet <kent.overstreet@linux.dev> | 2025-04-05 17:36:04 -0400 |
|---|---|---|
| committer | Kent Overstreet <kent.overstreet@linux.dev> | 2025-05-21 20:14:04 -0400 |
| commit | d4d71b58e5139afc5f9bda0139b99404eb216d8a (patch) | |
| tree | 5c9e000bd734c0bd2b3e11f7b271bd916dc796b4 /fs/bcachefs/io_write.c | |
| parent | a17e985be9831bf866795fe5e3da219d2061ce6c (diff) | |
bcachefs: RO mounts now use less memory
Defer memory allocations only needed in RW mode until we actually go RW.
This is part of improved support for RO images.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/io_write.c')
| -rw-r--r-- | fs/bcachefs/io_write.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/fs/bcachefs/io_write.c b/fs/bcachefs/io_write.c index c1237da079ed..401347e135b7 100644 --- a/fs/bcachefs/io_write.c +++ b/fs/bcachefs/io_write.c @@ -1744,7 +1744,6 @@ void bch2_write_op_to_text(struct printbuf *out, struct bch_write_op *op) void bch2_fs_io_write_exit(struct bch_fs *c) { - mempool_exit(&c->bio_bounce_pages); bioset_exit(&c->replica_set); bioset_exit(&c->bio_write); } @@ -1755,12 +1754,5 @@ int bch2_fs_io_write_init(struct bch_fs *c) bioset_init(&c->replica_set, 4, offsetof(struct bch_write_bio, bio), 0)) return -BCH_ERR_ENOMEM_bio_write_init; - if (mempool_init_page_pool(&c->bio_bounce_pages, - max_t(unsigned, - c->opts.btree_node_size, - c->opts.encoded_extent_max) / - PAGE_SIZE, 0)) - return -BCH_ERR_ENOMEM_bio_bounce_pages_init; - return 0; } |
