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
330581f1
Commit
330581f1
authored
Apr 05, 2019
by
Kent Overstreet
Committed by
Kent Overstreet
Oct 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: disallow ever going rw if nochanges or noreplay
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
4881fdb7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
fs/bcachefs/super.c
fs/bcachefs/super.c
+5
-0
No files found.
fs/bcachefs/super.c
View file @
330581f1
...
...
@@ -378,6 +378,10 @@ int __bch2_fs_read_write(struct bch_fs *c, bool early)
if
(
test_bit
(
BCH_FS_RW
,
&
c
->
flags
))
return
0
;
if
(
c
->
opts
.
nochanges
||
c
->
opts
.
noreplay
)
return
-
EINVAL
;
ret
=
bch2_fs_mark_dirty
(
c
);
if
(
ret
)
goto
err
;
...
...
@@ -684,6 +688,7 @@ static struct bch_fs *bch2_fs_alloc(struct bch_sb *sb, struct bch_opts opts)
c
->
opts
.
nochanges
|=
c
->
opts
.
noreplay
;
c
->
opts
.
read_only
|=
c
->
opts
.
nochanges
;
c
->
opts
.
read_only
|=
c
->
opts
.
noreplay
;
if
(
bch2_fs_init_fault
(
"fs_alloc"
))
goto
err
;
...
...
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