Skip to content

Commit f9a6a3f

Browse files
andrealmeidbrauner
authored andcommitted
docs: exportfs: Use source code struct documentation
Instead of duplicating struct export_operations documentation in both ReST file and in the C source code, just use the kernel-doc in the docs. While here, make the sentence preceding the paragraph less redundant. Signed-off-by: André Almeida <andrealmeid@igalia.com> Link: https://patch.msgid.link/20260112-tonyk-fs_uuid-v1-4-acc1889de772@igalia.com Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Christian Brauner <brauner@kernel.org>
1 parent 7a6f811 commit f9a6a3f

File tree

1 file changed

+5
-37
lines changed

1 file changed

+5
-37
lines changed

Documentation/filesystems/nfs/exporting.rst

Lines changed: 5 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -119,43 +119,11 @@ For a filesystem to be exportable it must:
119119

120120
A file system implementation declares that instances of the filesystem
121121
are exportable by setting the s_export_op field in the struct
122-
super_block. This field must point to a "struct export_operations"
123-
struct which has the following members:
124-
125-
encode_fh (mandatory)
126-
Takes a dentry and creates a filehandle fragment which may later be used
127-
to find or create a dentry for the same object.
128-
129-
fh_to_dentry (mandatory)
130-
Given a filehandle fragment, this should find the implied object and
131-
create a dentry for it (possibly with d_obtain_alias).
132-
133-
fh_to_parent (optional but strongly recommended)
134-
Given a filehandle fragment, this should find the parent of the
135-
implied object and create a dentry for it (possibly with
136-
d_obtain_alias). May fail if the filehandle fragment is too small.
137-
138-
get_parent (optional but strongly recommended)
139-
When given a dentry for a directory, this should return a dentry for
140-
the parent. Quite possibly the parent dentry will have been allocated
141-
by d_alloc_anon. The default get_parent function just returns an error
142-
so any filehandle lookup that requires finding a parent will fail.
143-
->lookup("..") is *not* used as a default as it can leave ".." entries
144-
in the dcache which are too messy to work with.
145-
146-
get_name (optional)
147-
When given a parent dentry and a child dentry, this should find a name
148-
in the directory identified by the parent dentry, which leads to the
149-
object identified by the child dentry. If no get_name function is
150-
supplied, a default implementation is provided which uses vfs_readdir
151-
to find potential names, and matches inode numbers to find the correct
152-
match.
153-
154-
flags
155-
Some filesystems may need to be handled differently than others. The
156-
export_operations struct also includes a flags field that allows the
157-
filesystem to communicate such information to nfsd. See the Export
158-
Operations Flags section below for more explanation.
122+
super_block. This field must point to a struct export_operations
123+
which has the following members:
124+
125+
.. kernel-doc:: include/linux/exportfs.h
126+
:identifiers: struct export_operations
159127

160128
A filehandle fragment consists of an array of 1 or more 4byte words,
161129
together with a one byte "type".

0 commit comments

Comments
 (0)