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
nexedi
linux
Commits
0ec2ca38
Commit
0ec2ca38
authored
Sep 12, 2002
by
Neil Brown
Committed by
David S. Miller
Sep 12, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] kNFSd 1: New structure initialisers for lockd.
Just the new structure initialisers.
parent
44b2fd85
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
82 additions
and
91 deletions
+82
-91
fs/lockd/mon.c
fs/lockd/mon.c
+32
-33
fs/lockd/svc.c
fs/lockd/svc.c
+19
-21
fs/lockd/svc4proc.c
fs/lockd/svc4proc.c
+7
-9
fs/lockd/svcproc.c
fs/lockd/svcproc.c
+7
-9
fs/lockd/xdr.c
fs/lockd/xdr.c
+14
-16
fs/lockd/xdr4.c
fs/lockd/xdr4.c
+3
-3
No files found.
fs/lockd/mon.c
View file @
0ec2ca38
...
@@ -206,61 +206,60 @@ xdr_decode_stat(struct rpc_rqst *rqstp, u32 *p, struct nsm_res *resp)
...
@@ -206,61 +206,60 @@ xdr_decode_stat(struct rpc_rqst *rqstp, u32 *p, struct nsm_res *resp)
static
struct
rpc_procinfo
nsm_procedures
[]
=
{
static
struct
rpc_procinfo
nsm_procedures
[]
=
{
{
{
p_procname:
"sm_null"
,
.
p_procname
=
"sm_null"
,
p_encode:
(
kxdrproc_t
)
xdr_error
,
.
p_encode
=
(
kxdrproc_t
)
xdr_error
,
p_decode:
(
kxdrproc_t
)
xdr_error
,
.
p_decode
=
(
kxdrproc_t
)
xdr_error
,
},
},
{
{
p_procname:
"sm_stat"
,
.
p_procname
=
"sm_stat"
,
p_encode:
(
kxdrproc_t
)
xdr_error
,
.
p_encode
=
(
kxdrproc_t
)
xdr_error
,
p_decode:
(
kxdrproc_t
)
xdr_error
,
.
p_decode
=
(
kxdrproc_t
)
xdr_error
,
},
},
{
{
p_procname:
"sm_mon"
,
.
p_procname
=
"sm_mon"
,
p_encode:
(
kxdrproc_t
)
xdr_encode_mon
,
.
p_encode
=
(
kxdrproc_t
)
xdr_encode_mon
,
p_decode:
(
kxdrproc_t
)
xdr_decode_stat_res
,
.
p_decode
=
(
kxdrproc_t
)
xdr_decode_stat_res
,
p_bufsiz:
MAX
(
SM_mon_sz
,
SM_monres_sz
)
<<
2
,
.
p_bufsiz
=
MAX
(
SM_mon_sz
,
SM_monres_sz
)
<<
2
,
},
},
{
{
p_procname:
"sm_unmon"
,
.
p_procname
=
"sm_unmon"
,
p_encode:
(
kxdrproc_t
)
xdr_encode_mon
,
.
p_encode
=
(
kxdrproc_t
)
xdr_encode_mon
,
p_decode:
(
kxdrproc_t
)
xdr_decode_stat
,
.
p_decode
=
(
kxdrproc_t
)
xdr_decode_stat
,
p_bufsiz:
MAX
(
SM_mon_id_sz
,
SM_unmonres_sz
)
<<
2
,
.
p_bufsiz
=
MAX
(
SM_mon_id_sz
,
SM_unmonres_sz
)
<<
2
,
},
},
{
{
p_procname:
"sm_unmon_all"
,
.
p_procname
=
"sm_unmon_all"
,
p_encode:
(
kxdrproc_t
)
xdr_error
,
.
p_encode
=
(
kxdrproc_t
)
xdr_error
,
p_decode:
(
kxdrproc_t
)
xdr_error
,
.
p_decode
=
(
kxdrproc_t
)
xdr_error
,
},
},
{
{
p_procname:
"sm_simu_crash"
,
.
p_procname
=
"sm_simu_crash"
,
p_encode:
(
kxdrproc_t
)
xdr_error
,
.
p_encode
=
(
kxdrproc_t
)
xdr_error
,
p_decode:
(
kxdrproc_t
)
xdr_error
,
0
,
0
.
p_decode
=
(
kxdrproc_t
)
xdr_error
,
},
},
{
{
p_procname:
"sm_notify"
,
.
p_procname
=
"sm_notify"
,
p_encode:
(
kxdrproc_t
)
xdr_error
,
.
p_encode
=
(
kxdrproc_t
)
xdr_error
,
p_decode:
(
kxdrproc_t
)
xdr_error
,
.
p_decode
=
(
kxdrproc_t
)
xdr_error
,
},
},
};
};
static
struct
rpc_version
nsm_version1
=
{
static
struct
rpc_version
nsm_version1
=
{
number:
1
,
.
number
=
1
,
nrprocs:
sizeof
(
nsm_procedures
)
/
sizeof
(
nsm_procedures
[
0
]),
.
nrprocs
=
sizeof
(
nsm_procedures
)
/
sizeof
(
nsm_procedures
[
0
]),
procs:
nsm_procedures
.
procs
=
nsm_procedures
};
};
static
struct
rpc_version
*
nsm_version
[]
=
{
static
struct
rpc_version
*
nsm_version
[]
=
{
NULL
,
[
1
]
=
&
nsm_version1
,
&
nsm_version1
,
};
};
static
struct
rpc_stat
nsm_stats
;
static
struct
rpc_stat
nsm_stats
;
struct
rpc_program
nsm_program
=
{
struct
rpc_program
nsm_program
=
{
name:
"statd"
,
.
name
=
"statd"
,
number:
SM_PROGRAM
,
.
number
=
SM_PROGRAM
,
nrvers:
sizeof
(
nsm_version
)
/
sizeof
(
nsm_version
[
0
]),
.
nrvers
=
sizeof
(
nsm_version
)
/
sizeof
(
nsm_version
[
0
]),
version:
nsm_version
,
.
version
=
nsm_version
,
stats:
&
nsm_stats
.
stats
=
&
nsm_stats
};
};
fs/lockd/svc.c
View file @
0ec2ca38
...
@@ -369,29 +369,27 @@ __setup("lockd.tcpport=", tcpport_set);
...
@@ -369,29 +369,27 @@ __setup("lockd.tcpport=", tcpport_set);
* Define NLM program and procedures
* Define NLM program and procedures
*/
*/
static
struct
svc_version
nlmsvc_version1
=
{
static
struct
svc_version
nlmsvc_version1
=
{
vs_vers:
1
,
.
vs_vers
=
1
,
vs_nproc:
17
,
.
vs_nproc
=
17
,
vs_proc:
nlmsvc_procedures
,
.
vs_proc
=
nlmsvc_procedures
,
};
};
static
struct
svc_version
nlmsvc_version3
=
{
static
struct
svc_version
nlmsvc_version3
=
{
vs_vers:
3
,
.
vs_vers
=
3
,
vs_nproc:
24
,
.
vs_nproc
=
24
,
vs_proc:
nlmsvc_procedures
,
.
vs_proc
=
nlmsvc_procedures
,
};
};
#ifdef CONFIG_LOCKD_V4
#ifdef CONFIG_LOCKD_V4
static
struct
svc_version
nlmsvc_version4
=
{
static
struct
svc_version
nlmsvc_version4
=
{
vs_vers:
4
,
.
vs_vers
=
4
,
vs_nproc:
24
,
.
vs_nproc
=
24
,
vs_proc:
nlmsvc_procedures4
,
.
vs_proc
=
nlmsvc_procedures4
,
};
};
#endif
#endif
static
struct
svc_version
*
nlmsvc_version
[]
=
{
static
struct
svc_version
*
nlmsvc_version
[]
=
{
NULL
,
[
1
]
=
&
nlmsvc_version1
,
&
nlmsvc_version1
,
[
3
]
=
&
nlmsvc_version3
,
NULL
,
&
nlmsvc_version3
,
#ifdef CONFIG_LOCKD_V4
#ifdef CONFIG_LOCKD_V4
&
nlmsvc_version4
,
[
4
]
=
&
nlmsvc_version4
,
#endif
#endif
};
};
...
@@ -399,11 +397,11 @@ static struct svc_stat nlmsvc_stats;
...
@@ -399,11 +397,11 @@ static struct svc_stat nlmsvc_stats;
#define NLM_NRVERS (sizeof(nlmsvc_version)/sizeof(nlmsvc_version[0]))
#define NLM_NRVERS (sizeof(nlmsvc_version)/sizeof(nlmsvc_version[0]))
struct
svc_program
nlmsvc_program
=
{
struct
svc_program
nlmsvc_program
=
{
pg_prog:
NLM_PROGRAM
,
/* program number */
.
pg_prog
=
NLM_PROGRAM
,
/* program number */
pg_lovers:
1
,
// version
.
pg_lovers
=
1
,
/* version */
pg_hivers:
NLM_NRVERS
-
1
,
// range
.
pg_hivers
=
NLM_NRVERS
-
1
,
/* range */
pg_nvers:
NLM_NRVERS
,
/* number of entries in nlmsvc_version */
.
pg_nvers
=
NLM_NRVERS
,
/* number of entries in nlmsvc_version */
pg_vers:
nlmsvc_version
,
/* version table */
.
pg_vers
=
nlmsvc_version
,
/* version table */
pg_name:
"lockd"
,
/* service name */
.
pg_name
=
"lockd"
,
/* service name */
pg_stats:
&
nlmsvc_stats
,
/* stats table */
.
pg_stats
=
&
nlmsvc_stats
,
/* stats table */
};
};
fs/lockd/svc4proc.c
View file @
0ec2ca38
...
@@ -527,15 +527,13 @@ nlm4svc_callback_exit(struct rpc_task *task)
...
@@ -527,15 +527,13 @@ nlm4svc_callback_exit(struct rpc_task *task)
struct
nlm_void
{
int
dummy
;
};
struct
nlm_void
{
int
dummy
;
};
#define PROC(name, xargt, xrest, argt, rest, respsize) \
#define PROC(name, xargt, xrest, argt, rest, respsize) \
{ (svc_procfunc) nlm4svc_proc_##name, \
{ .pc_func = (svc_procfunc) nlm4svc_proc_##name, \
(kxdrproc_t) nlm4svc_decode_##xargt, \
.pc_decode = (kxdrproc_t) nlm4svc_decode_##xargt, \
(kxdrproc_t) nlm4svc_encode_##xrest, \
.pc_encode = (kxdrproc_t) nlm4svc_encode_##xrest, \
NULL, \
.pc_release = NULL, \
sizeof(struct nlm_##argt), \
.pc_argsize = sizeof(struct nlm_##argt), \
sizeof(struct nlm_##rest), \
.pc_ressize = sizeof(struct nlm_##rest), \
0, \
.pc_xdrressize = respsize, \
0, \
respsize, \
}
}
#define Ck (1+8)
/* cookie */
#define Ck (1+8)
/* cookie */
#define No (1+1024/4)
/* netobj */
#define No (1+1024/4)
/* netobj */
...
...
fs/lockd/svcproc.c
View file @
0ec2ca38
...
@@ -555,15 +555,13 @@ nlmsvc_callback_exit(struct rpc_task *task)
...
@@ -555,15 +555,13 @@ nlmsvc_callback_exit(struct rpc_task *task)
struct
nlm_void
{
int
dummy
;
};
struct
nlm_void
{
int
dummy
;
};
#define PROC(name, xargt, xrest, argt, rest, respsize) \
#define PROC(name, xargt, xrest, argt, rest, respsize) \
{ (svc_procfunc) nlmsvc_proc_##name, \
{ .pc_func = (svc_procfunc) nlmsvc_proc_##name, \
(kxdrproc_t) nlmsvc_decode_##xargt, \
.pc_decode = (kxdrproc_t) nlmsvc_decode_##xargt, \
(kxdrproc_t) nlmsvc_encode_##xrest, \
.pc_encode = (kxdrproc_t) nlmsvc_encode_##xrest, \
NULL, \
.pc_release = NULL, \
sizeof(struct nlm_##argt), \
.pc_argsize = sizeof(struct nlm_##argt), \
sizeof(struct nlm_##rest), \
.pc_ressize = sizeof(struct nlm_##rest), \
0, \
.pc_xdrressize = respsize, \
0, \
respsize, \
}
}
#define Ck (1+8)
/* cookie */
#define Ck (1+8)
/* cookie */
...
...
fs/lockd/xdr.c
View file @
0ec2ca38
...
@@ -602,15 +602,15 @@ static struct rpc_procinfo nlm_procedures[] = {
...
@@ -602,15 +602,15 @@ static struct rpc_procinfo nlm_procedures[] = {
};
};
static
struct
rpc_version
nlm_version1
=
{
static
struct
rpc_version
nlm_version1
=
{
number:
1
,
.
number
=
1
,
nrprocs:
16
,
.
nrprocs
=
16
,
procs:
nlm_procedures
,
.
procs
=
nlm_procedures
,
};
};
static
struct
rpc_version
nlm_version3
=
{
static
struct
rpc_version
nlm_version3
=
{
number:
3
,
.
number
=
3
,
nrprocs:
24
,
.
nrprocs
=
24
,
procs:
nlm_procedures
,
.
procs
=
nlm_procedures
,
};
};
#ifdef CONFIG_LOCKD_V4
#ifdef CONFIG_LOCKD_V4
...
@@ -618,23 +618,21 @@ extern struct rpc_version nlm_version4;
...
@@ -618,23 +618,21 @@ extern struct rpc_version nlm_version4;
#endif
#endif
static
struct
rpc_version
*
nlm_versions
[]
=
{
static
struct
rpc_version
*
nlm_versions
[]
=
{
NULL
,
[
1
]
=
&
nlm_version1
,
&
nlm_version1
,
[
3
]
=
&
nlm_version3
,
NULL
,
&
nlm_version3
,
#ifdef CONFIG_LOCKD_V4
#ifdef CONFIG_LOCKD_V4
&
nlm_version4
,
[
4
]
=
&
nlm_version4
,
#endif
#endif
};
};
static
struct
rpc_stat
nlm_stats
;
static
struct
rpc_stat
nlm_stats
;
struct
rpc_program
nlm_program
=
{
struct
rpc_program
nlm_program
=
{
name:
"lockd"
,
.
name
=
"lockd"
,
number:
NLM_PROGRAM
,
.
number
=
NLM_PROGRAM
,
nrvers:
sizeof
(
nlm_versions
)
/
sizeof
(
nlm_versions
[
0
]),
.
nrvers
=
sizeof
(
nlm_versions
)
/
sizeof
(
nlm_versions
[
0
]),
version:
nlm_versions
,
.
version
=
nlm_versions
,
stats:
&
nlm_stats
,
.
stats
=
&
nlm_stats
,
};
};
#ifdef LOCKD_DEBUG
#ifdef LOCKD_DEBUG
...
...
fs/lockd/xdr4.c
View file @
0ec2ca38
...
@@ -608,7 +608,7 @@ static struct rpc_procinfo nlm4_procedures[] = {
...
@@ -608,7 +608,7 @@ static struct rpc_procinfo nlm4_procedures[] = {
};
};
struct
rpc_version
nlm_version4
=
{
struct
rpc_version
nlm_version4
=
{
number:
4
,
.
number
=
4
,
nrprocs:
24
,
.
nrprocs
=
24
,
procs:
nlm4_procedures
,
.
procs
=
nlm4_procedures
,
};
};
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