diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-03-14 21:48:42 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:29 -0400 |
commit | 31f63fd1244d9609265eb5cfc522c142b35cdacc (patch) | |
tree | ba7e780ac34fe7ce6f6647b0a47f4da301b26d83 /fs/bcachefs/movinggc.c | |
parent | d905f67ec89fda758bcfa70d0b5c3d3006bbdb3e (diff) | |
download | linux-stable-31f63fd1244d9609265eb5cfc522c142b35cdacc.tar.gz linux-stable-31f63fd1244d9609265eb5cfc522c142b35cdacc.tar.bz2 linux-stable-31f63fd1244d9609265eb5cfc522c142b35cdacc.zip |
bcachefs: Introduce a separate journal watermark for copygc
Since journal reclaim -> btree key cache flushing may require the
allocation of new btree nodes, it has an implicit dependency on copygc
in order to make forward progress - so we should avoid blocking copygc
unless the journal is really close to full.
This introduces watermarks to replace our single MAY_GET_UNRESERVED bit
in the journal, and adds a watermark for copygc and plumbs it through.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/movinggc.c')
-rw-r--r-- | fs/bcachefs/movinggc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/movinggc.c b/fs/bcachefs/movinggc.c index b43e54133b15..a54a83d3247b 100644 --- a/fs/bcachefs/movinggc.c +++ b/fs/bcachefs/movinggc.c @@ -91,7 +91,7 @@ static enum data_cmd copygc_pred(struct bch_fs *c, void *arg, data_opts->target = io_opts->background_target; data_opts->nr_replicas = 1; data_opts->btree_insert_flags = BTREE_INSERT_USE_RESERVE| - BTREE_INSERT_JOURNAL_RESERVED; + JOURNAL_WATERMARK_copygc; data_opts->rewrite_dev = p.ptr.dev; if (p.has_ec) |