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
c02c0886
Commit
c02c0886
authored
Apr 11, 2004
by
Andrew Morton
Committed by
Linus Torvalds
Apr 11, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] knfsd: Add server-side support for the nfsv4 mounted_on_fileid attribute.
From: NeilBrown <neilb@cse.unsw.edu.au>
parent
94b1c3eb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
fs/nfsd/nfs4xdr.c
fs/nfsd/nfs4xdr.c
+11
-0
include/linux/nfs4.h
include/linux/nfs4.h
+1
-0
include/linux/nfsd/nfsd.h
include/linux/nfsd/nfsd.h
+1
-1
No files found.
fs/nfsd/nfs4xdr.c
View file @
c02c0886
...
...
@@ -1588,7 +1588,18 @@ nfsd4_encode_fattr(struct svc_fh *fhp, struct svc_export *exp,
WRITE32
(
stat
.
mtime
.
tv_sec
);
WRITE32
(
stat
.
mtime
.
tv_nsec
);
}
if
(
bmval1
&
FATTR4_WORD1_MOUNTED_ON_FILEID
)
{
struct
dentry
*
mnt_pnt
,
*
mnt_root
;
if
((
buflen
-=
8
)
<
0
)
goto
out_resource
;
mnt_root
=
exp
->
ex_mnt
->
mnt_root
;
if
(
mnt_root
->
d_inode
==
dentry
->
d_inode
)
{
mnt_pnt
=
exp
->
ex_mnt
->
mnt_mountpoint
;
WRITE64
((
u64
)
mnt_pnt
->
d_inode
->
i_ino
);
}
else
WRITE64
((
u64
)
stat
.
ino
);
}
*
attrlenp
=
htonl
((
char
*
)
p
-
(
char
*
)
attrlenp
-
4
);
*
countp
=
p
-
buffer
;
status
=
nfs_ok
;
...
...
include/linux/nfs4.h
View file @
c02c0886
...
...
@@ -274,6 +274,7 @@ enum lock_type4 {
#define FATTR4_WORD1_TIME_METADATA (1 << 20)
#define FATTR4_WORD1_TIME_MODIFY (1 << 21)
#define FATTR4_WORD1_TIME_MODIFY_SET (1 << 22)
#define FATTR4_WORD1_MOUNTED_ON_FILEID (1 << 23)
#define NFSPROC4_NULL 0
#define NFSPROC4_COMPOUND 1
...
...
include/linux/nfsd/nfsd.h
View file @
c02c0886
...
...
@@ -278,7 +278,7 @@ static inline int is_fsid(struct svc_fh *fh, struct knfsd_fh *reffh)
| FATTR4_WORD1_SPACE_AVAIL | FATTR4_WORD1_SPACE_FREE | FATTR4_WORD1_SPACE_TOTAL \
| FATTR4_WORD1_SPACE_USED | FATTR4_WORD1_TIME_ACCESS | FATTR4_WORD1_TIME_ACCESS_SET \
| FATTR4_WORD1_TIME_CREATE | FATTR4_WORD1_TIME_DELTA | FATTR4_WORD1_TIME_METADATA \
| FATTR4_WORD1_TIME_MODIFY | FATTR4_WORD1_TIME_MODIFY_SET)
| FATTR4_WORD1_TIME_MODIFY | FATTR4_WORD1_TIME_MODIFY_SET
| FATTR4_WORD1_MOUNTED_ON_FILEID
)
/* These will return ERR_INVAL if specified in GETATTR or READDIR. */
#define NFSD_WRITEONLY_ATTRS_WORD1 \
...
...
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