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
85ac427f
Commit
85ac427f
authored
Apr 10, 2004
by
Trond Myklebust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NFSv4: use the (more efficient) NFSv2/v3-like XDR scheme for generating
GETATTR RPC calls.
parent
9c0c8d90
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
469 additions
and
15 deletions
+469
-15
fs/nfs/nfs4proc.c
fs/nfs/nfs4proc.c
+16
-9
fs/nfs/nfs4xdr.c
fs/nfs/nfs4xdr.c
+436
-2
include/linux/nfs4.h
include/linux/nfs4.h
+1
-0
include/linux/nfs_xdr.h
include/linux/nfs_xdr.h
+16
-4
No files found.
fs/nfs/nfs4proc.c
View file @
85ac427f
...
...
@@ -876,18 +876,25 @@ nfs4_proc_get_root(struct nfs_server *server, struct nfs_fh *fhandle,
return
nfs4_proc_fsinfo
(
server
,
fhandle
,
info
);
}
static
int
nfs4_proc_getattr
(
struct
inode
*
inode
,
struct
nfs_fattr
*
fattr
)
static
int
nfs4_proc_getattr
(
struct
inode
*
inode
,
struct
nfs_fattr
*
fattr
)
{
struct
nfs4_compound
compound
;
struct
nfs4_op
ops
[
2
];
struct
nfs4_getattr_arg
args
=
{
.
fh
=
NFS_FH
(
inode
),
.
bitmask
=
nfs4_fattr_bitmap
,
};
struct
nfs4_getattr_res
res
=
{
.
fattr
=
fattr
,
.
server
=
NFS_SERVER
(
inode
),
};
struct
rpc_message
msg
=
{
.
rpc_proc
=
&
nfs4_procedures
[
NFSPROC4_CLNT_GETATTR
],
.
rpc_argp
=
&
args
,
.
rpc_resp
=
&
res
,
};
fattr
->
valid
=
0
;
nfs4_setup_compound
(
&
compound
,
ops
,
NFS_SERVER
(
inode
),
"getattr"
);
nfs4_setup_putfh
(
&
compound
,
NFS_FH
(
inode
));
nfs4_setup_getattr
(
&
compound
,
fattr
);
return
nfs4_map_errors
(
nfs4_call_compound
(
&
compound
,
NULL
,
0
));
return
nfs4_map_errors
(
rpc_call_sync
(
NFS_CLIENT
(
inode
),
&
msg
,
0
));
}
/*
...
...
fs/nfs/nfs4xdr.c
View file @
85ac427f
This diff is collapsed.
Click to expand it.
include/linux/nfs4.h
View file @
85ac427f
...
...
@@ -304,6 +304,7 @@ enum {
NFSPROC4_CLNT_LOCKT
,
NFSPROC4_CLNT_LOCKU
,
NFSPROC4_CLNT_ACCESS
,
NFSPROC4_CLNT_GETATTR
,
};
#endif
...
...
include/linux/nfs_xdr.h
View file @
85ac427f
...
...
@@ -3,6 +3,11 @@
#include <linux/sunrpc/xprt.h>
struct
nfs4_fsid
{
__u64
major
;
__u64
minor
;
};
struct
nfs_fattr
{
unsigned
short
valid
;
/* which fields are valid */
__u64
pre_size
;
/* pre_op_attr.size */
...
...
@@ -26,10 +31,7 @@ struct nfs_fattr {
dev_t
rdev
;
union
{
__u64
nfs3
;
/* also nfs2 */
struct
{
__u64
major
;
__u64
minor
;
}
nfs4
;
struct
nfs4_fsid
nfs4
;
}
fsid_u
;
__u64
fileid
;
struct
timespec
atime
;
...
...
@@ -528,6 +530,16 @@ struct nfs4_getattr {
struct
nfs_pathconf
*
gt_pathconf
;
/* response */
};
struct
nfs4_getattr_arg
{
const
struct
nfs_fh
*
fh
;
const
u32
*
bitmask
;
};
struct
nfs4_getattr_res
{
const
struct
nfs_server
*
server
;
struct
nfs_fattr
*
fattr
;
};
struct
nfs4_getfh
{
struct
nfs_fh
*
gf_fhandle
;
/* response */
};
...
...
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