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
6d033aa4
Commit
6d033aa4
authored
Feb 09, 2019
by
Kent Overstreet
Committed by
Kent Overstreet
Oct 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: Don't need to walk inodes on clean shutdown
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
1df42b57
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
fs/bcachefs/fsck.c
fs/bcachefs/fsck.c
+11
-8
No files found.
fs/bcachefs/fsck.c
View file @
6d033aa4
...
@@ -1187,6 +1187,11 @@ static int check_inode(struct bch_fs *c,
...
@@ -1187,6 +1187,11 @@ static int check_inode(struct bch_fs *c,
}
}
if
(
u
.
bi_flags
&
BCH_INODE_UNLINKED
)
{
if
(
u
.
bi_flags
&
BCH_INODE_UNLINKED
)
{
fsck_err_on
(
c
->
sb
.
clean
,
c
,
"filesystem marked clean, "
"but inode %llu unlinked"
,
u
.
bi_inum
);
bch_verbose
(
c
,
"deleting inode %llu"
,
u
.
bi_inum
);
bch_verbose
(
c
,
"deleting inode %llu"
,
u
.
bi_inum
);
ret
=
bch2_inode_rm
(
c
,
u
.
bi_inum
);
ret
=
bch2_inode_rm
(
c
,
u
.
bi_inum
);
...
@@ -1389,16 +1394,13 @@ static int check_inodes_fast(struct bch_fs *c)
...
@@ -1389,16 +1394,13 @@ static int check_inodes_fast(struct bch_fs *c)
(
BCH_INODE_I_SIZE_DIRTY
|
(
BCH_INODE_I_SIZE_DIRTY
|
BCH_INODE_I_SECTORS_DIRTY
|
BCH_INODE_I_SECTORS_DIRTY
|
BCH_INODE_UNLINKED
))
{
BCH_INODE_UNLINKED
))
{
fsck_err_on
(
c
->
sb
.
clean
,
c
,
"filesystem marked clean but found inode %llu with flags %x"
,
inode
.
k
->
p
.
inode
,
inode
.
v
->
bi_flags
);
ret
=
check_inode
(
c
,
NULL
,
&
iter
,
inode
,
NULL
);
ret
=
check_inode
(
c
,
NULL
,
&
iter
,
inode
,
NULL
);
BUG_ON
(
ret
==
-
EINTR
);
BUG_ON
(
ret
==
-
EINTR
);
if
(
ret
)
if
(
ret
)
break
;
break
;
}
}
}
}
fsck_err:
return
bch2_btree_iter_unlock
(
&
iter
)
?:
ret
;
return
bch2_btree_iter_unlock
(
&
iter
)
?:
ret
;
}
}
...
@@ -1460,9 +1462,10 @@ int bch2_fsck(struct bch_fs *c)
...
@@ -1460,9 +1462,10 @@ int bch2_fsck(struct bch_fs *c)
if
(
c
->
opts
.
fsck
)
if
(
c
->
opts
.
fsck
)
return
bch2_fsck_full
(
c
);
return
bch2_fsck_full
(
c
);
if
(
!
c
->
sb
.
clean
&&
if
(
c
->
sb
.
clean
)
!
(
c
->
sb
.
features
&
(
1
<<
BCH_FEATURE_ATOMIC_NLINK
)))
return
0
;
return
bch2_fsck_inode_nlink
(
c
);
return
bch2_fsck_walk_inodes_only
(
c
);
return
c
->
sb
.
features
&
(
1
<<
BCH_FEATURE_ATOMIC_NLINK
)
?
bch2_fsck_walk_inodes_only
(
c
)
:
bch2_fsck_inode_nlink
(
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