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
dbe17f18
Commit
dbe17f18
authored
Dec 20, 2022
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: BKEY_INVALID_FROM_JOURNAL
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
facafdcb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
7 deletions
+8
-7
fs/bcachefs/alloc_background.c
fs/bcachefs/alloc_background.c
+3
-5
fs/bcachefs/bkey_methods.h
fs/bcachefs/bkey_methods.h
+2
-0
fs/bcachefs/journal_io.c
fs/bcachefs/journal_io.c
+3
-2
No files found.
fs/bcachefs/alloc_background.c
View file @
dbe17f18
...
...
@@ -280,11 +280,9 @@ int bch2_alloc_v4_invalid(const struct bch_fs *c, struct bkey_s_c k,
return
-
BCH_ERR_invalid_bkey
;
}
/*
* XXX this is wrong, we'll be checking updates that happened from
* before BCH_FS_CHECK_BACKPOINTERS_DONE
*/
if
(
rw
==
WRITE
&&
test_bit
(
BCH_FS_CHECK_BACKPOINTERS_DONE
,
&
c
->
flags
))
{
if
(
rw
==
WRITE
&&
!
(
flags
&
BKEY_INVALID_FROM_JOURNAL
)
&&
test_bit
(
BCH_FS_CHECK_BACKPOINTERS_DONE
,
&
c
->
flags
))
{
unsigned
i
,
bp_len
=
0
;
for
(
i
=
0
;
i
<
BCH_ALLOC_V4_NR_BACKPOINTERS
(
a
.
v
);
i
++
)
...
...
fs/bcachefs/bkey_methods.h
View file @
dbe17f18
...
...
@@ -38,6 +38,8 @@ struct bkey_ops {
extern
const
struct
bkey_ops
bch2_bkey_ops
[];
#define BKEY_INVALID_FROM_JOURNAL (1 << 1)
int
bch2_bkey_val_invalid
(
struct
bch_fs
*
,
struct
bkey_s_c
,
unsigned
,
struct
printbuf
*
);
int
__bch2_bkey_invalid
(
struct
bch_fs
*
,
struct
bkey_s_c
,
enum
btree_node_type
,
unsigned
,
struct
printbuf
*
);
...
...
fs/bcachefs/journal_io.c
View file @
dbe17f18
...
...
@@ -340,7 +340,7 @@ static int journal_entry_btree_keys_validate(struct bch_fs *c,
int
ret
=
journal_validate_key
(
c
,
jset
,
entry
,
entry
->
level
,
entry
->
btree_id
,
k
,
version
,
big_endian
,
write
);
k
,
version
,
big_endian
,
write
|
BKEY_INVALID_FROM_JOURNAL
);
if
(
ret
==
FSCK_DELETED_KEY
)
continue
;
...
...
@@ -661,7 +661,8 @@ static int journal_entry_overwrite_validate(struct bch_fs *c,
struct
jset_entry
*
entry
,
unsigned
version
,
int
big_endian
,
int
write
)
{
return
journal_entry_btree_keys_validate
(
c
,
jset
,
entry
,
version
,
big_endian
,
READ
);
return
journal_entry_btree_keys_validate
(
c
,
jset
,
entry
,
version
,
big_endian
,
READ
);
}
static
void
journal_entry_overwrite_to_text
(
struct
printbuf
*
out
,
struct
bch_fs
*
c
,
...
...
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