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
087e53c2
Commit
087e53c2
authored
Dec 20, 2022
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: Bring back BTREE_ITER_CACHED_NOFILL
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
dcced069
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
fs/bcachefs/btree_iter.c
fs/bcachefs/btree_iter.c
+4
-2
fs/bcachefs/btree_key_cache.c
fs/bcachefs/btree_key_cache.c
+1
-2
fs/bcachefs/btree_types.h
fs/bcachefs/btree_types.h
+1
-0
No files found.
fs/bcachefs/btree_iter.c
View file @
087e53c2
...
@@ -1581,7 +1581,8 @@ struct bkey_s_c bch2_btree_path_peek_slot(struct btree_path *path, struct bkey *
...
@@ -1581,7 +1581,8 @@ struct bkey_s_c bch2_btree_path_peek_slot(struct btree_path *path, struct bkey *
EBUG_ON
(
ck
&&
EBUG_ON
(
ck
&&
(
path
->
btree_id
!=
ck
->
key
.
btree_id
||
(
path
->
btree_id
!=
ck
->
key
.
btree_id
||
!
bkey_eq
(
path
->
pos
,
ck
->
key
.
pos
)));
!
bkey_eq
(
path
->
pos
,
ck
->
key
.
pos
)));
EBUG_ON
(
!
ck
||
!
ck
->
valid
);
if
(
!
ck
||
!
ck
->
valid
)
return
bkey_s_c_null
;
*
u
=
ck
->
k
->
k
;
*
u
=
ck
->
k
->
k
;
k
=
bkey_i_to_s_c
(
ck
->
k
);
k
=
bkey_i_to_s_c
(
ck
->
k
);
...
@@ -1860,7 +1861,8 @@ struct bkey_s_c btree_trans_peek_key_cache(struct btree_iter *iter, struct bpos
...
@@ -1860,7 +1861,8 @@ struct bkey_s_c btree_trans_peek_key_cache(struct btree_iter *iter, struct bpos
if
(
!
iter
->
key_cache_path
)
if
(
!
iter
->
key_cache_path
)
iter
->
key_cache_path
=
bch2_path_get
(
trans
,
iter
->
btree_id
,
pos
,
iter
->
key_cache_path
=
bch2_path_get
(
trans
,
iter
->
btree_id
,
pos
,
iter
->
flags
&
BTREE_ITER_INTENT
,
0
,
iter
->
flags
&
BTREE_ITER_INTENT
,
0
,
iter
->
flags
|
BTREE_ITER_CACHED
);
iter
->
flags
|
BTREE_ITER_CACHED
|
BTREE_ITER_CACHED_NOFILL
);
iter
->
key_cache_path
=
bch2_btree_path_set_pos
(
trans
,
iter
->
key_cache_path
,
pos
,
iter
->
key_cache_path
=
bch2_btree_path_set_pos
(
trans
,
iter
->
key_cache_path
,
pos
,
iter
->
flags
&
BTREE_ITER_INTENT
);
iter
->
flags
&
BTREE_ITER_INTENT
);
...
...
fs/bcachefs/btree_key_cache.c
View file @
087e53c2
...
@@ -487,7 +487,7 @@ bch2_btree_path_traverse_cached_slowpath(struct btree_trans *trans, struct btree
...
@@ -487,7 +487,7 @@ bch2_btree_path_traverse_cached_slowpath(struct btree_trans *trans, struct btree
path
->
l
[
0
].
lock_seq
=
ck
->
c
.
lock
.
state
.
seq
;
path
->
l
[
0
].
lock_seq
=
ck
->
c
.
lock
.
state
.
seq
;
path
->
l
[
0
].
b
=
(
void
*
)
ck
;
path
->
l
[
0
].
b
=
(
void
*
)
ck
;
fill:
fill:
if
(
!
ck
->
valid
)
{
if
(
!
ck
->
valid
&&
!
(
flags
&
BTREE_ITER_CACHED_NOFILL
)
)
{
/*
/*
* Using the underscore version because we haven't set
* Using the underscore version because we haven't set
* path->uptodate yet:
* path->uptodate yet:
...
@@ -508,7 +508,6 @@ bch2_btree_path_traverse_cached_slowpath(struct btree_trans *trans, struct btree
...
@@ -508,7 +508,6 @@ bch2_btree_path_traverse_cached_slowpath(struct btree_trans *trans, struct btree
set_bit
(
BKEY_CACHED_ACCESSED
,
&
ck
->
flags
);
set_bit
(
BKEY_CACHED_ACCESSED
,
&
ck
->
flags
);
path
->
uptodate
=
BTREE_ITER_UPTODATE
;
path
->
uptodate
=
BTREE_ITER_UPTODATE
;
BUG_ON
(
!
ck
->
valid
);
BUG_ON
(
btree_node_locked_type
(
path
,
0
)
!=
btree_lock_want
(
path
,
0
));
BUG_ON
(
btree_node_locked_type
(
path
,
0
)
!=
btree_lock_want
(
path
,
0
));
return
ret
;
return
ret
;
...
...
fs/bcachefs/btree_types.h
View file @
087e53c2
...
@@ -207,6 +207,7 @@ struct btree_node_iter {
...
@@ -207,6 +207,7 @@ struct btree_node_iter {
#define BTREE_ITER_ALL_SNAPSHOTS (1 << 11)
#define BTREE_ITER_ALL_SNAPSHOTS (1 << 11)
#define BTREE_ITER_FILTER_SNAPSHOTS (1 << 12)
#define BTREE_ITER_FILTER_SNAPSHOTS (1 << 12)
#define BTREE_ITER_NOPRESERVE (1 << 13)
#define BTREE_ITER_NOPRESERVE (1 << 13)
#define BTREE_ITER_CACHED_NOFILL (1 << 14)
enum
btree_path_uptodate
{
enum
btree_path_uptodate
{
BTREE_ITER_UPTODATE
=
0
,
BTREE_ITER_UPTODATE
=
0
,
...
...
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