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
9d455b24
Commit
9d455b24
authored
Mar 29, 2019
by
Kent Overstreet
Committed by
Kent Overstreet
Oct 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: make sure to use BTREE_INSERT_LAZY_RW in fsck
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
0bc166ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
fs/bcachefs/fsck.c
fs/bcachefs/fsck.c
+15
-6
No files found.
fs/bcachefs/fsck.c
View file @
9d455b24
...
...
@@ -91,7 +91,9 @@ static int reattach_inode(struct bch_fs *c,
bch2_inode_pack
(
&
packed
,
lostfound_inode
);
ret
=
bch2_btree_insert
(
c
,
BTREE_ID_INODES
,
&
packed
.
inode
.
k_i
,
NULL
,
NULL
,
BTREE_INSERT_NOFAIL
);
NULL
,
NULL
,
BTREE_INSERT_NOFAIL
|
BTREE_INSERT_LAZY_RW
);
if
(
ret
)
{
bch_err
(
c
,
"error %i reattaching inode %llu while updating lost+found"
,
ret
,
inum
);
...
...
@@ -101,7 +103,8 @@ static int reattach_inode(struct bch_fs *c,
ret
=
bch2_dirent_create
(
c
,
lostfound_inode
->
bi_inum
,
&
lostfound_hash_info
,
DT_DIR
,
&
name
,
inum
,
NULL
,
BTREE_INSERT_NOFAIL
);
BTREE_INSERT_NOFAIL
|
BTREE_INSERT_LAZY_RW
);
if
(
ret
)
{
bch_err
(
c
,
"error %i reattaching inode %llu while creating new dirent"
,
ret
,
inum
);
...
...
@@ -483,7 +486,8 @@ static int check_extents(struct bch_fs *c)
ret
=
bch2_btree_insert
(
c
,
BTREE_ID_INODES
,
&
p
.
inode
.
k_i
,
NULL
,
NULL
,
BTREE_INSERT_NOFAIL
);
BTREE_INSERT_NOFAIL
|
BTREE_INSERT_LAZY_RW
);
if
(
ret
)
{
bch_err
(
c
,
"error in fs gc: error %i "
"updating inode"
,
ret
);
...
...
@@ -751,7 +755,9 @@ static int check_root(struct bch_fs *c, struct bch_inode_unpacked *root_inode)
bch2_inode_pack
(
&
packed
,
root_inode
);
return
bch2_btree_insert
(
c
,
BTREE_ID_INODES
,
&
packed
.
inode
.
k_i
,
NULL
,
NULL
,
BTREE_INSERT_NOFAIL
);
NULL
,
NULL
,
BTREE_INSERT_NOFAIL
|
BTREE_INSERT_LAZY_RW
);
}
/* Get lost+found, create if it doesn't exist: */
...
...
@@ -795,7 +801,9 @@ static int check_lostfound(struct bch_fs *c,
bch2_inode_pack
(
&
packed
,
root_inode
);
ret
=
bch2_btree_insert
(
c
,
BTREE_ID_INODES
,
&
packed
.
inode
.
k_i
,
NULL
,
NULL
,
BTREE_INSERT_NOFAIL
);
NULL
,
NULL
,
BTREE_INSERT_NOFAIL
|
BTREE_INSERT_LAZY_RW
);
if
(
ret
)
return
ret
;
...
...
@@ -809,7 +817,8 @@ static int check_lostfound(struct bch_fs *c,
ret
=
bch2_dirent_create
(
c
,
BCACHEFS_ROOT_INO
,
&
root_hash_info
,
DT_DIR
,
&
lostfound
,
lostfound_inode
->
bi_inum
,
NULL
,
BTREE_INSERT_NOFAIL
);
BTREE_INSERT_NOFAIL
|
BTREE_INSERT_LAZY_RW
);
if
(
ret
)
return
ret
;
...
...
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