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
49a5192c
Commit
49a5192c
authored
Jan 03, 2024
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: Add an option to control btree node prefetching
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
8a0dda6f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
fs/bcachefs/btree_iter.c
fs/bcachefs/btree_iter.c
+4
-2
fs/bcachefs/opts.h
fs/bcachefs/opts.h
+7
-1
No files found.
fs/bcachefs/btree_iter.c
View file @
49a5192c
...
...
@@ -897,7 +897,8 @@ static noinline int btree_node_iter_and_journal_peek(struct btree_trans *trans,
bch2_bkey_buf_reassemble
(
out
,
c
,
k
);
if
(
flags
&
BTREE_ITER_PREFETCH
)
if
((
flags
&
BTREE_ITER_PREFETCH
)
&&
c
->
opts
.
btree_node_prefetch
)
ret
=
btree_path_prefetch_j
(
trans
,
path
,
&
jiter
);
bch2_btree_and_journal_iter_exit
(
&
jiter
);
...
...
@@ -929,7 +930,8 @@ static __always_inline int btree_path_down(struct btree_trans *trans,
bch2_bkey_buf_unpack
(
&
tmp
,
c
,
l
->
b
,
bch2_btree_node_iter_peek
(
&
l
->
iter
,
l
->
b
));
if
(
flags
&
BTREE_ITER_PREFETCH
)
{
if
((
flags
&
BTREE_ITER_PREFETCH
)
&&
c
->
opts
.
btree_node_prefetch
)
{
ret
=
btree_path_prefetch
(
trans
,
path
);
if
(
ret
)
goto
err
;
...
...
fs/bcachefs/opts.h
View file @
49a5192c
...
...
@@ -458,7 +458,13 @@ enum fsck_err_opts {
OPT_UINT(0, BCH_REPLICAS_MAX), \
BCH2_NO_SB_OPT, 1, \
"n", "Data written to this device will be considered\n"\
"to have already been replicated n times")
"to have already been replicated n times") \
x(btree_node_prefetch, u8, \
OPT_FS|OPT_MOUNT|OPT_RUNTIME, \
OPT_BOOL(), \
BCH2_NO_SB_OPT, true, \
NULL, "BTREE_ITER_PREFETCH casuse btree nodes to be\n"\
" prefetched sequentially")
struct
bch_opts
{
#define x(_name, _bits, ...) unsigned _name##_defined:1;
...
...
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