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
6fc11138
Commit
6fc11138
authored
Jun 23, 2003
by
Neil Brown
Committed by
Linus Torvalds
Jun 23, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Define cache_show methods for export and filehandle cache in nfsd.
parent
d9c6a4e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
0 deletions
+52
-0
fs/nfsd/export.c
fs/nfsd/export.c
+52
-0
No files found.
fs/nfsd/export.c
View file @
6fc11138
...
...
@@ -193,6 +193,31 @@ int expkey_parse(struct cache_detail *cd, char *mesg, int mlen)
return
err
;
}
static
int
expkey_show
(
struct
seq_file
*
m
,
struct
cache_detail
*
cd
,
struct
cache_head
*
h
,
char
*
pbuf
)
{
struct
svc_expkey
*
ek
;
if
(
h
==
NULL
)
{
seq_puts
(
m
,
"#domain fsidtype fsid [path]
\n
"
);
return
0
;
}
ek
=
container_of
(
h
,
struct
svc_expkey
,
h
);
seq_printf
(
m
,
"%s %d 0x%08x"
,
ek
->
ek_client
->
name
,
ek
->
ek_fsidtype
,
ek
->
ek_fsid
[
0
]);
if
(
ek
->
ek_fsid
==
0
)
seq_printf
(
m
,
"%08x"
,
ek
->
ek_fsid
[
0
]);
if
(
test_bit
(
CACHE_VALID
,
&
h
->
flags
)
&&
!
test_bit
(
CACHE_NEGATIVE
,
&
h
->
flags
))
{
seq_printf
(
m
,
" "
);
seq_path
(
m
,
ek
->
ek_export
->
ex_mnt
,
ek
->
ek_export
->
ex_dentry
,
"
\\
\t\n
"
);
}
seq_printf
(
m
,
"
\n
"
);
return
0
;
}
struct
cache_detail
svc_expkey_cache
=
{
.
hash_size
=
EXPKEY_HASHMAX
,
.
hash_table
=
expkey_table
,
...
...
@@ -200,6 +225,7 @@ struct cache_detail svc_expkey_cache = {
.
cache_put
=
expkey_put
,
.
cache_request
=
expkey_request
,
.
cache_parse
=
expkey_parse
,
.
cache_show
=
expkey_show
,
};
static
inline
int
svc_expkey_match
(
struct
svc_expkey
*
a
,
struct
svc_expkey
*
b
)
...
...
@@ -407,6 +433,31 @@ int svc_export_parse(struct cache_detail *cd, char *mesg, int mlen)
return
err
;
}
static
void
exp_flags
(
struct
seq_file
*
m
,
int
flag
,
int
fsid
,
uid_t
anonu
,
uid_t
anong
);
static
int
svc_export_show
(
struct
seq_file
*
m
,
struct
cache_detail
*
cd
,
struct
cache_head
*
h
,
char
*
pbuf
)
{
struct
svc_export
*
exp
;
if
(
h
==
NULL
)
{
seq_puts
(
m
,
"#path domain(flags)
\n
"
);
return
0
;
}
exp
=
container_of
(
h
,
struct
svc_export
,
h
);
seq_path
(
m
,
exp
->
ex_mnt
,
exp
->
ex_dentry
,
"
\t\n\\
"
);
seq_putc
(
m
,
'\t'
);
seq_escape
(
m
,
exp
->
ex_client
->
name
,
"
\t\n\\
"
);
seq_putc
(
m
,
'('
);
if
(
test_bit
(
CACHE_VALID
,
&
h
->
flags
)
&&
!
test_bit
(
CACHE_NEGATIVE
,
&
h
->
flags
))
exp_flags
(
m
,
exp
->
ex_flags
,
exp
->
ex_fsid
,
exp
->
ex_anon_uid
,
exp
->
ex_anon_gid
);
seq_puts
(
m
,
")
\n
"
);
return
0
;
}
struct
cache_detail
svc_export_cache
=
{
.
hash_size
=
EXPORT_HASHMAX
,
.
hash_table
=
export_table
,
...
...
@@ -414,6 +465,7 @@ struct cache_detail svc_export_cache = {
.
cache_put
=
svc_export_put
,
.
cache_request
=
svc_export_request
,
.
cache_parse
=
svc_export_parse
,
.
cache_show
=
svc_export_show
,
};
static
inline
int
svc_export_match
(
struct
svc_export
*
a
,
struct
svc_export
*
b
)
...
...
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