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
8e3cc200
Commit
8e3cc200
authored
Apr 30, 2024
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: bch2_bkey_has_target() -> bch2_dev_rcu()
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
8feecbed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
fs/bcachefs/extents.c
fs/bcachefs/extents.c
+10
-3
No files found.
fs/bcachefs/extents.c
View file @
8e3cc200
...
...
@@ -870,14 +870,21 @@ const struct bch_extent_ptr *bch2_bkey_has_device_c(struct bkey_s_c k, unsigned
bool
bch2_bkey_has_target
(
struct
bch_fs
*
c
,
struct
bkey_s_c
k
,
unsigned
target
)
{
struct
bkey_ptrs_c
ptrs
=
bch2_bkey_ptrs_c
(
k
);
struct
bch_dev
*
ca
;
bool
ret
=
false
;
rcu_read_lock
();
bkey_for_each_ptr
(
ptrs
,
ptr
)
if
(
bch2_dev_in_target
(
c
,
ptr
->
dev
,
target
)
&&
(
ca
=
bch2_dev_rcu
(
c
,
ptr
->
dev
))
&&
(
!
ptr
->
cached
||
!
dev_ptr_stale
(
bch2_dev_bkey_exists
(
c
,
ptr
->
dev
),
ptr
)))
return
true
;
!
dev_ptr_stale_rcu
(
ca
,
ptr
)))
{
ret
=
true
;
break
;
}
rcu_read_unlock
();
return
false
;
return
ret
;
}
bool
bch2_bkey_matches_ptr
(
struct
bch_fs
*
c
,
struct
bkey_s_c
k
,
...
...
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