From f33c58fc46a9c5bd6cbf90edb6ce17fa3fd912d5 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Tue, 27 Jun 2023 17:32:48 -0400 Subject: bcachefs: Kill BTREE_INSERT_USE_RESERVE Now that we have journal watermarks and alloc watermarks unified, BTREE_INSERT_USE_RESERVE is redundant and can be deleted. Signed-off-by: Kent Overstreet --- fs/bcachefs/btree_write_buffer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'fs/bcachefs/btree_write_buffer.c') diff --git a/fs/bcachefs/btree_write_buffer.c b/fs/bcachefs/btree_write_buffer.c index 4003fa1f0319..b50226313a47 100644 --- a/fs/bcachefs/btree_write_buffer.c +++ b/fs/bcachefs/btree_write_buffer.c @@ -213,6 +213,9 @@ slowpath: btree_write_buffered_journal_cmp, NULL); + commit_flags &= ~BCH_WATERMARK_MASK; + commit_flags |= BCH_WATERMARK_reclaim; + for (i = keys; i < keys + nr; i++) { if (!i->journal_seq) continue; @@ -231,8 +234,7 @@ slowpath: ret = commit_do(trans, NULL, NULL, commit_flags| BTREE_INSERT_NOFAIL| - BTREE_INSERT_JOURNAL_RECLAIM| - BCH_WATERMARK_reclaim, + BTREE_INSERT_JOURNAL_RECLAIM, __bch2_btree_insert(trans, i->btree, &i->k, 0)); if (bch2_fs_fatal_err_on(ret, c, "%s: insert error %s", __func__, bch2_err_str(ret))) break; -- cgit v1.2.3-70-g09d2