diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-05-18 23:53:43 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:03 -0400 |
commit | ef1b20924b0f584740094fdf7166acfb80338f0c (patch) | |
tree | f8abf635aa829ef4e61243ddcd9bac546455cc12 /fs/bcachefs/super.c | |
parent | ed34341189478344eb54588ce73f190b86da4d5e (diff) |
bcachefs: Ratelimiting for writeback IOs
Writeback throttling is a kernel config option and not always enabled.
When it's not enabled we need a fallback, to avoid unbounded memory
pinning and work item backlogs.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/super.c')
-rw-r--r-- | fs/bcachefs/super.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/super.c b/fs/bcachefs/super.c index 71493b5ff695..b0bcd3bbb53b 100644 --- a/fs/bcachefs/super.c +++ b/fs/bcachefs/super.c @@ -717,6 +717,8 @@ static struct bch_fs *bch2_fs_alloc(struct bch_sb *sb, struct bch_opts opts) seqcount_init(&c->usage_lock); + sema_init(&c->io_in_flight, 128); + c->copy_gc_enabled = 1; c->rebalance.enabled = 1; c->promote_whole_extents = true; |