Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge patch series "exportfs: Some kernel-doc fixes"

André Almeida <andrealmeid@igalia.com> says:

This short series removes some duplicated documentation and address some
kernel-doc issues.

* patches from https://patch.msgid.link/20260112-tonyk-fs_uuid-v1-0-acc1889de772@igalia.com:
docs: exportfs: Use source code struct documentation
exportfs: Complete kernel-doc for struct export_operations
exportfs: Mark struct export_operations functions at kernel-doc
exportfs: Fix kernel-doc output for get_name()

Link: https://patch.msgid.link/20260112-tonyk-fs_uuid-v1-0-acc1889de772@igalia.com
Signed-off-by: Christian Brauner <brauner@kernel.org>

+27 -46
+4 -36
Documentation/filesystems/nfs/exporting.rst
··· 119 119 120 120 A file system implementation declares that instances of the filesystem 121 121 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: 122 + super_block. This field must point to a struct export_operations 123 + which has the following members: 124 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. 125 + .. kernel-doc:: include/linux/exportfs.h 126 + :identifiers: struct export_operations 159 127 160 128 A filehandle fragment consists of an array of 1 or more 4byte words, 161 129 together with a one byte "type".
+23 -10
include/linux/exportfs.h
··· 201 201 * @commit_metadata: commit metadata changes to stable storage 202 202 * 203 203 * See Documentation/filesystems/nfs/exporting.rst for details on how to use 204 - * this interface correctly. 204 + * this interface correctly and the definition of the flags. 205 205 * 206 - * encode_fh: 206 + * @encode_fh: 207 207 * @encode_fh should store in the file handle fragment @fh (using at most 208 208 * @max_len bytes) information that can be used by @decode_fh to recover the 209 209 * file referred to by the &struct dentry @de. If @flag has CONNECTABLE bit ··· 215 215 * greater than @max_len*4 bytes). On error @max_len contains the minimum 216 216 * size(in 4 byte unit) needed to encode the file handle. 217 217 * 218 - * fh_to_dentry: 218 + * @fh_to_dentry: 219 219 * @fh_to_dentry is given a &struct super_block (@sb) and a file handle 220 220 * fragment (@fh, @fh_len). It should return a &struct dentry which refers 221 221 * to the same file that the file handle fragment refers to. If it cannot, ··· 227 227 * created with d_alloc_root. The caller can then find any other extant 228 228 * dentries by following the d_alias links. 229 229 * 230 - * fh_to_parent: 230 + * @fh_to_parent: 231 231 * Same as @fh_to_dentry, except that it returns a pointer to the parent 232 232 * dentry if it was encoded into the filehandle fragment by @encode_fh. 233 233 * 234 - * get_name: 234 + * @get_name: 235 235 * @get_name should find a name for the given @child in the given @parent 236 236 * directory. The name should be stored in the @name (with the 237 - * understanding that it is already pointing to a %NAME_MAX+1 sized 237 + * understanding that it is already pointing to a %NAME_MAX + 1 sized 238 238 * buffer. get_name() should return %0 on success, a negative error code 239 239 * or error. @get_name will be called without @parent->i_rwsem held. 240 240 * 241 - * get_parent: 241 + * @get_parent: 242 242 * @get_parent should find the parent directory for the given @child which 243 243 * is also a directory. In the event that it cannot be found, or storage 244 244 * space cannot be allocated, a %ERR_PTR should be returned. 245 245 * 246 - * permission: 246 + * @permission: 247 247 * Allow filesystems to specify a custom permission function. 248 248 * 249 - * open: 249 + * @open: 250 250 * Allow filesystems to specify a custom open function. 251 251 * 252 - * commit_metadata: 252 + * @commit_metadata: 253 253 * @commit_metadata should commit metadata changes to stable storage. 254 + * 255 + * @get_uuid: 256 + * Get a filesystem unique signature exposed to clients. 257 + * 258 + * @map_blocks: 259 + * Map and, if necessary, allocate blocks for a layout. 260 + * 261 + * @commit_blocks: 262 + * Commit blocks in a layout once the client is done with them. 263 + * 264 + * @flags: 265 + * Allows the filesystem to communicate to nfsd that it may want to do things 266 + * differently when dealing with it. 254 267 * 255 268 * Locking rules: 256 269 * get_parent is called with child->d_inode->i_rwsem down