Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
linux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hardware-enablement
Rockchip upstream enablement efforts
linux
Commits
ba96d36c
Commit
ba96d36c
authored
1 year ago
by
Kent Overstreet
Browse files
Options
Downloads
Patches
Plain Diff
bcachefs: bkey_and_val_eq()
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
e6a2566f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fs/bcachefs/backpointers.c
+8
-3
8 additions, 3 deletions
fs/bcachefs/backpointers.c
with
8 additions
and
3 deletions
fs/bcachefs/backpointers.c
+
8
−
3
View file @
ba96d36c
...
...
@@ -400,6 +400,13 @@ int bch2_check_btree_backpointers(struct bch_fs *c)
return
ret
;
}
static
inline
bool
bkey_and_val_eq
(
struct
bkey_s_c
l
,
struct
bkey_s_c
r
)
{
return
bpos_eq
(
l
.
k
->
p
,
r
.
k
->
p
)
&&
bkey_bytes
(
l
.
k
)
==
bkey_bytes
(
r
.
k
)
&&
!
memcmp
(
l
.
v
,
r
.
v
,
bkey_val_bytes
(
l
.
k
));
}
static
int
check_bp_exists
(
struct
btree_trans
*
trans
,
struct
bpos
bucket
,
struct
bch_backpointer
bp
,
...
...
@@ -433,9 +440,7 @@ static int check_bp_exists(struct btree_trans *trans,
if
(
bp_k
.
k
->
type
!=
KEY_TYPE_backpointer
||
memcmp
(
bkey_s_c_to_backpointer
(
bp_k
).
v
,
&
bp
,
sizeof
(
bp
)))
{
if
(
!
bpos_eq
(
orig_k
.
k
->
p
,
last_flushed
->
k
->
k
.
p
)
||
bkey_bytes
(
orig_k
.
k
)
!=
bkey_bytes
(
&
last_flushed
->
k
->
k
)
||
memcmp
(
orig_k
.
v
,
&
last_flushed
->
k
->
v
,
bkey_val_bytes
(
orig_k
.
k
)))
{
if
(
!
bkey_and_val_eq
(
orig_k
,
bkey_i_to_s_c
(
last_flushed
->
k
)))
{
bch2_bkey_buf_reassemble
(
&
tmp
,
c
,
orig_k
);
if
(
bp
.
level
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment