Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
linux
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martyn Welch
linux
Commits
77cb271e
Commit
77cb271e
authored
5 years ago
by
Al Viro
Browse files
Options
Downloads
Patches
Plain Diff
gfs2: switch to use of errorfc() et.al.
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
2e28c49e
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
fs/gfs2/ops_fstype.c
+15
-15
15 additions, 15 deletions
fs/gfs2/ops_fstype.c
with
15 additions
and
15 deletions
fs/gfs2/ops_fstype.c
+
15
−
15
View file @
77cb271e
...
@@ -1359,7 +1359,7 @@ static int gfs2_parse_param(struct fs_context *fc, struct fs_parameter *param)
...
@@ -1359,7 +1359,7 @@ static int gfs2_parse_param(struct fs_context *fc, struct fs_parameter *param)
break
;
break
;
case
Opt_debug
:
case
Opt_debug
:
if
(
result
.
boolean
&&
args
->
ar_errors
==
GFS2_ERRORS_PANIC
)
if
(
result
.
boolean
&&
args
->
ar_errors
==
GFS2_ERRORS_PANIC
)
return
invalf
(
fc
,
"
gfs2:
-o debug and -o errors=panic are mutually exclusive"
);
return
invalf
c
(
fc
,
"-o debug and -o errors=panic are mutually exclusive"
);
args
->
ar_debug
=
result
.
boolean
;
args
->
ar_debug
=
result
.
boolean
;
break
;
break
;
case
Opt_upgrade
:
case
Opt_upgrade
:
...
@@ -1389,27 +1389,27 @@ static int gfs2_parse_param(struct fs_context *fc, struct fs_parameter *param)
...
@@ -1389,27 +1389,27 @@ static int gfs2_parse_param(struct fs_context *fc, struct fs_parameter *param)
break
;
break
;
case
Opt_commit
:
case
Opt_commit
:
if
(
result
.
int_32
<=
0
)
if
(
result
.
int_32
<=
0
)
return
invalf
(
fc
,
"
gfs2:
commit mount option requires a positive numeric argument"
);
return
invalf
c
(
fc
,
"commit mount option requires a positive numeric argument"
);
args
->
ar_commit
=
result
.
int_32
;
args
->
ar_commit
=
result
.
int_32
;
break
;
break
;
case
Opt_statfs_quantum
:
case
Opt_statfs_quantum
:
if
(
result
.
int_32
<
0
)
if
(
result
.
int_32
<
0
)
return
invalf
(
fc
,
"
gfs2:
statfs_quantum mount option requires a non-negative numeric argument"
);
return
invalf
c
(
fc
,
"statfs_quantum mount option requires a non-negative numeric argument"
);
args
->
ar_statfs_quantum
=
result
.
int_32
;
args
->
ar_statfs_quantum
=
result
.
int_32
;
break
;
break
;
case
Opt_quota_quantum
:
case
Opt_quota_quantum
:
if
(
result
.
int_32
<=
0
)
if
(
result
.
int_32
<=
0
)
return
invalf
(
fc
,
"
gfs2:
quota_quantum mount option requires a positive numeric argument"
);
return
invalf
c
(
fc
,
"quota_quantum mount option requires a positive numeric argument"
);
args
->
ar_quota_quantum
=
result
.
int_32
;
args
->
ar_quota_quantum
=
result
.
int_32
;
break
;
break
;
case
Opt_statfs_percent
:
case
Opt_statfs_percent
:
if
(
result
.
int_32
<
0
||
result
.
int_32
>
100
)
if
(
result
.
int_32
<
0
||
result
.
int_32
>
100
)
return
invalf
(
fc
,
"
gfs2:
statfs_percent mount option requires a numeric argument between 0 and 100"
);
return
invalf
c
(
fc
,
"statfs_percent mount option requires a numeric argument between 0 and 100"
);
args
->
ar_statfs_percent
=
result
.
int_32
;
args
->
ar_statfs_percent
=
result
.
int_32
;
break
;
break
;
case
Opt_errors
:
case
Opt_errors
:
if
(
args
->
ar_debug
&&
result
.
uint_32
==
GFS2_ERRORS_PANIC
)
if
(
args
->
ar_debug
&&
result
.
uint_32
==
GFS2_ERRORS_PANIC
)
return
invalf
(
fc
,
"
gfs2:
-o debug and -o errors=panic are mutually exclusive"
);
return
invalf
c
(
fc
,
"-o debug and -o errors=panic are mutually exclusive"
);
args
->
ar_errors
=
result
.
uint_32
;
args
->
ar_errors
=
result
.
uint_32
;
break
;
break
;
case
Opt_barrier
:
case
Opt_barrier
:
...
@@ -1422,7 +1422,7 @@ static int gfs2_parse_param(struct fs_context *fc, struct fs_parameter *param)
...
@@ -1422,7 +1422,7 @@ static int gfs2_parse_param(struct fs_context *fc, struct fs_parameter *param)
args
->
ar_loccookie
=
result
.
boolean
;
args
->
ar_loccookie
=
result
.
boolean
;
break
;
break
;
default:
default:
return
invalf
(
fc
,
"
gfs2:
invalid mount option: %s"
,
param
->
key
);
return
invalf
c
(
fc
,
"invalid mount option: %s"
,
param
->
key
);
}
}
return
0
;
return
0
;
}
}
...
@@ -1448,27 +1448,27 @@ static int gfs2_reconfigure(struct fs_context *fc)
...
@@ -1448,27 +1448,27 @@ static int gfs2_reconfigure(struct fs_context *fc)
spin_unlock
(
&
gt
->
gt_spin
);
spin_unlock
(
&
gt
->
gt_spin
);
if
(
strcmp
(
newargs
->
ar_lockproto
,
oldargs
->
ar_lockproto
))
{
if
(
strcmp
(
newargs
->
ar_lockproto
,
oldargs
->
ar_lockproto
))
{
errorf
(
fc
,
"
gfs2:
reconfiguration of locking protocol not allowed"
);
errorf
c
(
fc
,
"reconfiguration of locking protocol not allowed"
);
return
-
EINVAL
;
return
-
EINVAL
;
}
}
if
(
strcmp
(
newargs
->
ar_locktable
,
oldargs
->
ar_locktable
))
{
if
(
strcmp
(
newargs
->
ar_locktable
,
oldargs
->
ar_locktable
))
{
errorf
(
fc
,
"
gfs2:
reconfiguration of lock table not allowed"
);
errorf
c
(
fc
,
"reconfiguration of lock table not allowed"
);
return
-
EINVAL
;
return
-
EINVAL
;
}
}
if
(
strcmp
(
newargs
->
ar_hostdata
,
oldargs
->
ar_hostdata
))
{
if
(
strcmp
(
newargs
->
ar_hostdata
,
oldargs
->
ar_hostdata
))
{
errorf
(
fc
,
"
gfs2:
reconfiguration of host data not allowed"
);
errorf
c
(
fc
,
"reconfiguration of host data not allowed"
);
return
-
EINVAL
;
return
-
EINVAL
;
}
}
if
(
newargs
->
ar_spectator
!=
oldargs
->
ar_spectator
)
{
if
(
newargs
->
ar_spectator
!=
oldargs
->
ar_spectator
)
{
errorf
(
fc
,
"
gfs2:
reconfiguration of spectator mode not allowed"
);
errorf
c
(
fc
,
"reconfiguration of spectator mode not allowed"
);
return
-
EINVAL
;
return
-
EINVAL
;
}
}
if
(
newargs
->
ar_localflocks
!=
oldargs
->
ar_localflocks
)
{
if
(
newargs
->
ar_localflocks
!=
oldargs
->
ar_localflocks
)
{
errorf
(
fc
,
"
gfs2:
reconfiguration of localflocks not allowed"
);
errorf
c
(
fc
,
"reconfiguration of localflocks not allowed"
);
return
-
EINVAL
;
return
-
EINVAL
;
}
}
if
(
newargs
->
ar_meta
!=
oldargs
->
ar_meta
)
{
if
(
newargs
->
ar_meta
!=
oldargs
->
ar_meta
)
{
errorf
(
fc
,
"
gfs2:
switching between gfs2 and gfs2meta not allowed"
);
errorf
c
(
fc
,
"switching between gfs2 and gfs2meta not allowed"
);
return
-
EINVAL
;
return
-
EINVAL
;
}
}
if
(
oldargs
->
ar_spectator
)
if
(
oldargs
->
ar_spectator
)
...
@@ -1478,11 +1478,11 @@ static int gfs2_reconfigure(struct fs_context *fc)
...
@@ -1478,11 +1478,11 @@ static int gfs2_reconfigure(struct fs_context *fc)
if
(
fc
->
sb_flags
&
SB_RDONLY
)
{
if
(
fc
->
sb_flags
&
SB_RDONLY
)
{
error
=
gfs2_make_fs_ro
(
sdp
);
error
=
gfs2_make_fs_ro
(
sdp
);
if
(
error
)
if
(
error
)
errorf
(
fc
,
"
gfs2:
unable to remount read-only"
);
errorf
c
(
fc
,
"unable to remount read-only"
);
}
else
{
}
else
{
error
=
gfs2_make_fs_rw
(
sdp
);
error
=
gfs2_make_fs_rw
(
sdp
);
if
(
error
)
if
(
error
)
errorf
(
fc
,
"
gfs2:
unable to remount read-write"
);
errorf
c
(
fc
,
"unable to remount read-write"
);
}
}
}
}
sdp
->
sd_args
=
*
newargs
;
sdp
->
sd_args
=
*
newargs
;
...
...
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