Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
b4b79b07
Commit
b4b79b07
authored
Nov 13, 2023
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: Don't rejournal keys in key cache flush
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
5fd24caf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
fs/bcachefs/btree_key_cache.c
fs/bcachefs/btree_key_cache.c
+11
-6
No files found.
fs/bcachefs/btree_key_cache.c
View file @
b4b79b07
...
...
@@ -645,11 +645,19 @@ static int btree_key_cache_flush_pos(struct btree_trans *trans,
if
(
journal_seq
&&
ck
->
journal
.
seq
!=
journal_seq
)
goto
out
;
trans
->
journal_res
.
seq
=
ck
->
journal
.
seq
;
/*
* Since journal reclaim depends on us making progress here, and the
* allocator/copygc depend on journal reclaim making progress, we need
* to be using alloc reserves:
* If we're at the end of the journal, we really want to free up space
* in the journal right away - we don't want to pin that old journal
* sequence number with a new btree node write, we want to re-journal
* the update
*/
if
(
ck
->
journal
.
seq
==
journal_last_seq
(
j
))
commit_flags
|=
BCH_WATERMARK_reclaim
;
else
commit_flags
|=
BCH_TRANS_COMMIT_no_journal_res
;
ret
=
bch2_btree_iter_traverse
(
&
b_iter
)
?:
bch2_trans_update
(
trans
,
&
b_iter
,
ck
->
k
,
BTREE_UPDATE_KEY_CACHE_RECLAIM
|
...
...
@@ -658,9 +666,6 @@ static int btree_key_cache_flush_pos(struct btree_trans *trans,
bch2_trans_commit
(
trans
,
NULL
,
NULL
,
BCH_TRANS_COMMIT_no_check_rw
|
BCH_TRANS_COMMIT_no_enospc
|
(
ck
->
journal
.
seq
==
journal_last_seq
(
j
)
?
BCH_WATERMARK_reclaim
:
0
)
|
commit_flags
);
bch2_fs_fatal_err_on
(
ret
&&
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment