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

docs: filesystems: convert mount_api.txt to ReST

- Add a SPDX header;
- Adjust document and section titles;
- Some whitespace fixes and new line breaks;
- Mark literal blocks as such;
- Add table markups;
- Add lists markups;
- Add it to filesystems/index.rst.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/32332c1659a28c22561cb5e64162c959856066b4.1588021877.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>

authored by

Mauro Carvalho Chehab and committed by
Jonathan Corbet
791a17ee a02dcdf6

+218 -116
+1
Documentation/filesystems/index.rst
··· 30 30 files 31 31 locks 32 32 mandatory-locking 33 + mount_api 33 34 34 35 automount-support 35 36
+215 -114
Documentation/filesystems/mount_api.txt Documentation/filesystems/mount_api.rst
··· 1 - ==================== 2 - FILESYSTEM MOUNT API 3 - ==================== 1 + .. SPDX-License-Identifier: GPL-2.0 4 2 5 - CONTENTS 3 + ==================== 4 + fILESYSTEM Mount API 5 + ==================== 6 + 7 + .. CONTENTS 6 8 7 9 (1) Overview. 8 10 ··· 23 21 (8) Parameter helper functions. 24 22 25 23 26 - ======== 27 - OVERVIEW 24 + Overview 28 25 ======== 29 26 30 27 The creation of new mounts is now to be done in a multistep process: ··· 44 43 45 44 (7) Destroy the context. 46 45 47 - To support this, the file_system_type struct gains two new fields: 46 + To support this, the file_system_type struct gains two new fields:: 48 47 49 48 int (*init_fs_context)(struct fs_context *fc); 50 49 const struct fs_parameter_description *parameters; ··· 58 57 that the namespaces may be adjusted first. 59 58 60 59 61 - ====================== 62 - THE FILESYSTEM CONTEXT 60 + The Filesystem context 63 61 ====================== 64 62 65 63 The creation and reconfiguration of a superblock is governed by a filesystem 66 - context. This is represented by the fs_context structure: 64 + context. This is represented by the fs_context structure:: 67 65 68 66 struct fs_context { 69 67 const struct fs_context_operations *ops; ··· 86 86 87 87 The fs_context fields are as follows: 88 88 89 - (*) const struct fs_context_operations *ops 89 + * :: 90 + 91 + const struct fs_context_operations *ops 90 92 91 93 These are operations that can be done on a filesystem context (see 92 94 below). This must be set by the ->init_fs_context() file_system_type 93 95 operation. 94 96 95 - (*) struct file_system_type *fs_type 97 + * :: 98 + 99 + struct file_system_type *fs_type 96 100 97 101 A pointer to the file_system_type of the filesystem that is being 98 102 constructed or reconfigured. This retains a reference on the type owner. 99 103 100 - (*) void *fs_private 104 + * :: 105 + 106 + void *fs_private 101 107 102 108 A pointer to the file system's private data. This is where the filesystem 103 109 will need to store any options it parses. 104 110 105 - (*) struct dentry *root 111 + * :: 112 + 113 + struct dentry *root 106 114 107 115 A pointer to the root of the mountable tree (and indirectly, the 108 116 superblock thereof). This is filled in by the ->get_tree() op. If this 109 117 is set, an active reference on root->d_sb must also be held. 110 118 111 - (*) struct user_namespace *user_ns 112 - (*) struct net *net_ns 119 + * :: 120 + 121 + struct user_namespace *user_ns 122 + struct net *net_ns 113 123 114 124 There are a subset of the namespaces in use by the invoking process. They 115 125 retain references on each namespace. The subscribed namespaces may be 116 126 replaced by the filesystem to reflect other sources, such as the parent 117 127 mount superblock on an automount. 118 128 119 - (*) const struct cred *cred 129 + * :: 130 + 131 + const struct cred *cred 120 132 121 133 The mounter's credentials. This retains a reference on the credentials. 122 134 123 - (*) char *source 135 + * :: 136 + 137 + char *source 124 138 125 139 This specifies the source. It may be a block device (e.g. /dev/sda1) or 126 140 something more exotic, such as the "host:/path" that NFS desires. 127 141 128 - (*) char *subtype 142 + * :: 143 + 144 + char *subtype 129 145 130 146 This is a string to be added to the type displayed in /proc/mounts to 131 147 qualify it (used by FUSE). This is available for the filesystem to set if 132 148 desired. 133 149 134 - (*) void *security 150 + * :: 151 + 152 + void *security 135 153 136 154 A place for the LSMs to hang their security data for the superblock. The 137 155 relevant security operations are described below. 138 156 139 - (*) void *s_fs_info 157 + * :: 158 + 159 + void *s_fs_info 140 160 141 161 The proposed s_fs_info for a new superblock, set in the superblock by 142 162 sget_fc(). This can be used to distinguish superblocks. 143 163 144 - (*) unsigned int sb_flags 145 - (*) unsigned int sb_flags_mask 164 + * :: 165 + 166 + unsigned int sb_flags 167 + unsigned int sb_flags_mask 146 168 147 169 Which bits SB_* flags are to be set/cleared in super_block::s_flags. 148 170 149 - (*) unsigned int s_iflags 171 + * :: 172 + 173 + unsigned int s_iflags 150 174 151 175 These will be bitwise-OR'd with s->s_iflags when a superblock is created. 152 176 153 - (*) enum fs_context_purpose 177 + * :: 178 + 179 + enum fs_context_purpose 154 180 155 181 This indicates the purpose for which the context is intended. The 156 182 available values are: 157 183 158 - FS_CONTEXT_FOR_MOUNT, -- New superblock for explicit mount 159 - FS_CONTEXT_FOR_SUBMOUNT -- New automatic submount of extant mount 160 - FS_CONTEXT_FOR_RECONFIGURE -- Change an existing mount 184 + ========================== ====================================== 185 + FS_CONTEXT_FOR_MOUNT, New superblock for explicit mount 186 + FS_CONTEXT_FOR_SUBMOUNT New automatic submount of extant mount 187 + FS_CONTEXT_FOR_RECONFIGURE Change an existing mount 188 + ========================== ====================================== 161 189 162 190 The mount context is created by calling vfs_new_fs_context() or 163 191 vfs_dup_fs_context() and is destroyed with put_fs_context(). Note that the ··· 204 176 module. 205 177 206 178 207 - ================================= 208 - THE FILESYSTEM CONTEXT OPERATIONS 179 + The Filesystem Context Operations 209 180 ================================= 210 181 211 - The filesystem context points to a table of operations: 182 + The filesystem context points to a table of operations:: 212 183 213 184 struct fs_context_operations { 214 185 void (*free)(struct fs_context *fc); ··· 222 195 These operations are invoked by the various stages of the mount procedure to 223 196 manage the filesystem context. They are as follows: 224 197 225 - (*) void (*free)(struct fs_context *fc); 198 + * :: 199 + 200 + void (*free)(struct fs_context *fc); 226 201 227 202 Called to clean up the filesystem-specific part of the filesystem context 228 203 when the context is destroyed. It should be aware that parts of the 229 204 context may have been removed and NULL'd out by ->get_tree(). 230 205 231 - (*) int (*dup)(struct fs_context *fc, struct fs_context *src_fc); 206 + * :: 207 + 208 + int (*dup)(struct fs_context *fc, struct fs_context *src_fc); 232 209 233 210 Called when a filesystem context has been duplicated to duplicate the 234 211 filesystem-private data. An error may be returned to indicate failure to 235 212 do this. 236 213 237 - [!] Note that even if this fails, put_fs_context() will be called 214 + .. Warning:: 215 + 216 + Note that even if this fails, put_fs_context() will be called 238 217 immediately thereafter, so ->dup() *must* make the 239 218 filesystem-private data safe for ->free(). 240 219 241 - (*) int (*parse_param)(struct fs_context *fc, 242 - struct struct fs_parameter *param); 220 + * :: 221 + 222 + int (*parse_param)(struct fs_context *fc, 223 + struct struct fs_parameter *param); 243 224 244 225 Called when a parameter is being added to the filesystem context. param 245 226 points to the key name and maybe a value object. VFS-specific options ··· 259 224 260 225 If successful, 0 should be returned or a negative error code otherwise. 261 226 262 - (*) int (*parse_monolithic)(struct fs_context *fc, void *data); 227 + * :: 228 + 229 + int (*parse_monolithic)(struct fs_context *fc, void *data); 263 230 264 231 Called when the mount(2) system call is invoked to pass the entire data 265 232 page in one go. If this is expected to be just a list of "key[=val]" ··· 273 236 finds it's the standard key-val list then it may pass it off to 274 237 generic_parse_monolithic(). 275 238 276 - (*) int (*get_tree)(struct fs_context *fc); 239 + * :: 240 + 241 + int (*get_tree)(struct fs_context *fc); 277 242 278 243 Called to get or create the mountable root and superblock, using the 279 244 information stored in the filesystem context (reconfiguration goes via a ··· 288 249 The phase on a userspace-driven context will be set to only allow this to 289 250 be called once on any particular context. 290 251 291 - (*) int (*reconfigure)(struct fs_context *fc); 252 + * :: 253 + 254 + int (*reconfigure)(struct fs_context *fc); 292 255 293 256 Called to effect reconfiguration of a superblock using information stored 294 257 in the filesystem context. It may detach any resources it desires from ··· 300 259 On success it should return 0. In the case of an error, it should return 301 260 a negative error code. 302 261 303 - [NOTE] reconfigure is intended as a replacement for remount_fs. 262 + .. Note:: reconfigure is intended as a replacement for remount_fs. 304 263 305 264 306 - =========================== 307 - FILESYSTEM CONTEXT SECURITY 265 + Filesystem context Security 308 266 =========================== 309 267 310 268 The filesystem context contains a security pointer that the LSMs can use for 311 269 building up a security context for the superblock to be mounted. There are a 312 270 number of operations used by the new mount code for this purpose: 313 271 314 - (*) int security_fs_context_alloc(struct fs_context *fc, 315 - struct dentry *reference); 272 + * :: 273 + 274 + int security_fs_context_alloc(struct fs_context *fc, 275 + struct dentry *reference); 316 276 317 277 Called to initialise fc->security (which is preset to NULL) and allocate 318 278 any resources needed. It should return 0 on success or a negative error ··· 325 283 non-NULL in the case of a submount (FS_CONTEXT_FOR_SUBMOUNT) in which case 326 284 it indicates the automount point. 327 285 328 - (*) int security_fs_context_dup(struct fs_context *fc, 329 - struct fs_context *src_fc); 286 + * :: 287 + 288 + int security_fs_context_dup(struct fs_context *fc, 289 + struct fs_context *src_fc); 330 290 331 291 Called to initialise fc->security (which is preset to NULL) and allocate 332 292 any resources needed. The original filesystem context is pointed to by 333 293 src_fc and may be used for reference. It should return 0 on success or a 334 294 negative error code on failure. 335 295 336 - (*) void security_fs_context_free(struct fs_context *fc); 296 + * :: 297 + 298 + void security_fs_context_free(struct fs_context *fc); 337 299 338 300 Called to clean up anything attached to fc->security. Note that the 339 301 contents may have been transferred to a superblock and the pointer cleared 340 302 during get_tree. 341 303 342 - (*) int security_fs_context_parse_param(struct fs_context *fc, 343 - struct fs_parameter *param); 304 + * :: 305 + 306 + int security_fs_context_parse_param(struct fs_context *fc, 307 + struct fs_parameter *param); 344 308 345 309 Called for each mount parameter, including the source. The arguments are 346 310 as for the ->parse_param() method. It should return 0 to indicate that ··· 358 310 (provided the value pointer is NULL'd out). If it is stolen, 1 must be 359 311 returned to prevent it being passed to the filesystem. 360 312 361 - (*) int security_fs_context_validate(struct fs_context *fc); 313 + * :: 314 + 315 + int security_fs_context_validate(struct fs_context *fc); 362 316 363 317 Called after all the options have been parsed to validate the collection 364 318 as a whole and to do any necessary allocation so that ··· 370 320 In the case of reconfiguration, the target superblock will be accessible 371 321 via fc->root. 372 322 373 - (*) int security_sb_get_tree(struct fs_context *fc); 323 + * :: 324 + 325 + int security_sb_get_tree(struct fs_context *fc); 374 326 375 327 Called during the mount procedure to verify that the specified superblock 376 328 is allowed to be mounted and to transfer the security data there. It 377 329 should return 0 or a negative error code. 378 330 379 - (*) void security_sb_reconfigure(struct fs_context *fc); 331 + * :: 332 + 333 + void security_sb_reconfigure(struct fs_context *fc); 380 334 381 335 Called to apply any reconfiguration to an LSM's context. It must not 382 336 fail. Error checking and resource allocation must be done in advance by 383 337 the parameter parsing and validation hooks. 384 338 385 - (*) int security_sb_mountpoint(struct fs_context *fc, struct path *mountpoint, 386 - unsigned int mnt_flags); 339 + * :: 340 + 341 + int security_sb_mountpoint(struct fs_context *fc, 342 + struct path *mountpoint, 343 + unsigned int mnt_flags); 387 344 388 345 Called during the mount procedure to verify that the root dentry attached 389 346 to the context is permitted to be attached to the specified mountpoint. 390 347 It should return 0 on success or a negative error code on failure. 391 348 392 349 393 - ========================== 394 - VFS FILESYSTEM CONTEXT API 350 + VFS Filesystem context API 395 351 ========================== 396 352 397 353 There are four operations for creating a filesystem context and one for 398 354 destroying a context: 399 355 400 - (*) struct fs_context *fs_context_for_mount( 401 - struct file_system_type *fs_type, 402 - unsigned int sb_flags); 356 + * :: 357 + 358 + struct fs_context *fs_context_for_mount(struct file_system_type *fs_type, 359 + unsigned int sb_flags); 403 360 404 361 Allocate a filesystem context for the purpose of setting up a new mount, 405 362 whether that be with a new superblock or sharing an existing one. This ··· 416 359 fs_type specifies the filesystem type that will manage the context and 417 360 sb_flags presets the superblock flags stored therein. 418 361 419 - (*) struct fs_context *fs_context_for_reconfigure( 362 + * :: 363 + 364 + struct fs_context *fs_context_for_reconfigure( 420 365 struct dentry *dentry, 421 366 unsigned int sb_flags, 422 367 unsigned int sb_flags_mask); ··· 428 369 configured. sb_flags and sb_flags_mask indicate which superblock flags 429 370 need changing and to what. 430 371 431 - (*) struct fs_context *fs_context_for_submount( 372 + * :: 373 + 374 + struct fs_context *fs_context_for_submount( 432 375 struct file_system_type *fs_type, 433 376 struct dentry *reference); 434 377 ··· 443 382 Note that it's not a requirement that the reference dentry be of the same 444 383 filesystem type as fs_type. 445 384 446 - (*) struct fs_context *vfs_dup_fs_context(struct fs_context *src_fc); 385 + * :: 386 + 387 + struct fs_context *vfs_dup_fs_context(struct fs_context *src_fc); 447 388 448 389 Duplicate a filesystem context, copying any options noted and duplicating 449 390 or additionally referencing any resources held therein. This is available ··· 455 392 456 393 The purpose in the new context is inherited from the old one. 457 394 458 - (*) void put_fs_context(struct fs_context *fc); 395 + * :: 396 + 397 + void put_fs_context(struct fs_context *fc); 459 398 460 399 Destroy a filesystem context, releasing any resources it holds. This 461 400 calls the ->free() operation. This is intended to be called by anyone who 462 401 created a filesystem context. 463 402 464 - [!] filesystem contexts are not refcounted, so this causes unconditional 465 - destruction. 403 + .. Warning:: 404 + 405 + filesystem contexts are not refcounted, so this causes unconditional 406 + destruction. 466 407 467 408 In all the above operations, apart from the put op, the return is a mount 468 409 context pointer or a negative error code. ··· 474 407 For the remaining operations, if an error occurs, a negative error code will be 475 408 returned. 476 409 477 - (*) int vfs_parse_fs_param(struct fs_context *fc, 478 - struct fs_parameter *param); 410 + * :: 411 + 412 + int vfs_parse_fs_param(struct fs_context *fc, 413 + struct fs_parameter *param); 479 414 480 415 Supply a single mount parameter to the filesystem context. This include 481 416 the specification of the source/device which is specified as the "source" ··· 492 423 493 424 The parameter value is typed and can be one of: 494 425 495 - fs_value_is_flag, Parameter not given a value. 496 - fs_value_is_string, Value is a string 497 - fs_value_is_blob, Value is a binary blob 498 - fs_value_is_filename, Value is a filename* + dirfd 499 - fs_value_is_file, Value is an open file (file*) 426 + ==================== ============================= 427 + fs_value_is_flag Parameter not given a value 428 + fs_value_is_string Value is a string 429 + fs_value_is_blob Value is a binary blob 430 + fs_value_is_filename Value is a filename* + dirfd 431 + fs_value_is_file Value is an open file (file*) 432 + ==================== ============================= 500 433 501 434 If there is a value, that value is stored in a union in the struct in one 502 435 of param->{string,blob,name,file}. Note that the function may steal and 503 436 clear the pointer, but then becomes responsible for disposing of the 504 437 object. 505 438 506 - (*) int vfs_parse_fs_string(struct fs_context *fc, const char *key, 507 - const char *value, size_t v_size); 439 + * :: 440 + 441 + int vfs_parse_fs_string(struct fs_context *fc, const char *key, 442 + const char *value, size_t v_size); 508 443 509 444 A wrapper around vfs_parse_fs_param() that copies the value string it is 510 445 passed. 511 446 512 - (*) int generic_parse_monolithic(struct fs_context *fc, void *data); 447 + * :: 448 + 449 + int generic_parse_monolithic(struct fs_context *fc, void *data); 513 450 514 451 Parse a sys_mount() data page, assuming the form to be a text list 515 452 consisting of key[=val] options separated by commas. Each item in the 516 453 list is passed to vfs_mount_option(). This is the default when the 517 454 ->parse_monolithic() method is NULL. 518 455 519 - (*) int vfs_get_tree(struct fs_context *fc); 456 + * :: 457 + 458 + int vfs_get_tree(struct fs_context *fc); 520 459 521 460 Get or create the mountable root and superblock, using the parameters in 522 461 the filesystem context to select/configure the superblock. This invokes 523 462 the ->get_tree() method. 524 463 525 - (*) struct vfsmount *vfs_create_mount(struct fs_context *fc); 464 + * :: 465 + 466 + struct vfsmount *vfs_create_mount(struct fs_context *fc); 526 467 527 468 Create a mount given the parameters in the specified filesystem context. 528 469 Note that this does not attach the mount to anything. 529 470 530 471 531 - =========================== 532 - SUPERBLOCK CREATION HELPERS 472 + Superblock Creation Helpers 533 473 =========================== 534 474 535 475 A number of VFS helpers are available for use by filesystems for the creation 536 476 or looking up of superblocks. 537 477 538 - (*) struct super_block * 539 - sget_fc(struct fs_context *fc, 540 - int (*test)(struct super_block *sb, struct fs_context *fc), 541 - int (*set)(struct super_block *sb, struct fs_context *fc)); 478 + * :: 479 + 480 + struct super_block * 481 + sget_fc(struct fs_context *fc, 482 + int (*test)(struct super_block *sb, struct fs_context *fc), 483 + int (*set)(struct super_block *sb, struct fs_context *fc)); 542 484 543 485 This is the core routine. If test is non-NULL, it searches for an 544 486 existing superblock matching the criteria held in the fs_context, using ··· 562 482 563 483 The following helpers all wrap sget_fc(): 564 484 565 - (*) int vfs_get_super(struct fs_context *fc, 566 - enum vfs_get_super_keying keying, 567 - int (*fill_super)(struct super_block *sb, 568 - struct fs_context *fc)) 485 + * :: 486 + 487 + int vfs_get_super(struct fs_context *fc, 488 + enum vfs_get_super_keying keying, 489 + int (*fill_super)(struct super_block *sb, 490 + struct fs_context *fc)) 569 491 570 492 This creates/looks up a deviceless superblock. The keying indicates how 571 493 many superblocks of this type may exist and in what manner they may be ··· 597 515 ===================== 598 516 599 517 Parameters are described using structures defined in linux/fs_parser.h. 600 - There's a core description struct that links everything together: 518 + There's a core description struct that links everything together:: 601 519 602 520 struct fs_parameter_description { 603 521 const struct fs_parameter_spec *specs; 604 522 const struct fs_parameter_enum *enums; 605 523 }; 606 524 607 - For example: 525 + For example:: 608 526 609 527 enum { 610 528 Opt_autocell, ··· 621 539 622 540 The members are as follows: 623 541 624 - (1) const struct fs_parameter_specification *specs; 542 + (1) :: 543 + 544 + const struct fs_parameter_specification *specs; 625 545 626 546 Table of parameter specifications, terminated with a null entry, where the 627 - entries are of type: 547 + entries are of type:: 628 548 629 549 struct fs_parameter_spec { 630 550 const char *name; ··· 642 558 643 559 The 'type' field indicates the desired value type and must be one of: 644 560 561 + ======================= ======================= ===================== 645 562 TYPE NAME EXPECTED VALUE RESULT IN 646 563 ======================= ======================= ===================== 647 564 fs_param_is_flag No value n/a ··· 658 573 fs_param_is_blockdev Blockdev path * Needs lookup 659 574 fs_param_is_path Path * Needs lookup 660 575 fs_param_is_fd File descriptor result->int_32 576 + ======================= ======================= ===================== 661 577 662 578 Note that if the value is of fs_param_is_bool type, fs_parse() will try 663 579 to match any string value against "0", "1", "no", "yes", "false", "true". 664 580 665 581 Each parameter can also be qualified with 'flags': 666 582 583 + ======================= ================================================ 667 584 fs_param_v_optional The value is optional 668 585 fs_param_neg_with_no result->negated set if key is prefixed with "no" 669 586 fs_param_neg_with_empty result->negated set if value is "" 670 587 fs_param_deprecated The parameter is deprecated. 588 + ======================= ================================================ 671 589 672 590 These are wrapped with a number of convenience wrappers: 673 591 592 + ======================= =============================================== 674 593 MACRO SPECIFIES 675 594 ======================= =============================================== 676 595 fsparam_flag() fs_param_is_flag ··· 691 602 fsparam_bdev() fs_param_is_blockdev 692 603 fsparam_path() fs_param_is_path 693 604 fsparam_fd() fs_param_is_fd 605 + ======================= =============================================== 694 606 695 607 all of which take two arguments, name string and option number - for 696 - example: 608 + example:: 697 609 698 610 static const struct fs_parameter_spec afs_param_specs[] = { 699 611 fsparam_flag ("autocell", Opt_autocell), ··· 708 618 of arguments to specify the type and the flags for anything that doesn't 709 619 match one of the above macros. 710 620 711 - (2) const struct fs_parameter_enum *enums; 621 + (2) :: 622 + 623 + const struct fs_parameter_enum *enums; 712 624 713 625 Table of enum value names to integer mappings, terminated with a null 714 - entry. This is of type: 626 + entry. This is of type:: 715 627 716 628 struct fs_parameter_enum { 717 629 u8 opt; ··· 722 630 }; 723 631 724 632 Where the array is an unsorted list of { parameter ID, name }-keyed 725 - elements that indicate the value to map to, e.g.: 633 + elements that indicate the value to map to, e.g.:: 726 634 727 635 static const struct fs_parameter_enum afs_param_enums[] = { 728 636 { Opt_bar, "x", 1}, ··· 740 648 userspace using the fsinfo() syscall. 741 649 742 650 743 - ========================== 744 - PARAMETER HELPER FUNCTIONS 651 + Parameter Helper Functions 745 652 ========================== 746 653 747 654 A number of helper functions are provided to help a filesystem or an LSM 748 655 process the parameters it is given. 749 656 750 - (*) int lookup_constant(const struct constant_table tbl[], 751 - const char *name, int not_found); 657 + * :: 658 + 659 + int lookup_constant(const struct constant_table tbl[], 660 + const char *name, int not_found); 752 661 753 662 Look up a constant by name in a table of name -> integer mappings. The 754 - table is an array of elements of the following type: 663 + table is an array of elements of the following type:: 755 664 756 665 struct constant_table { 757 666 const char *name; ··· 762 669 If a match is found, the corresponding value is returned. If a match 763 670 isn't found, the not_found value is returned instead. 764 671 765 - (*) bool validate_constant_table(const struct constant_table *tbl, 766 - size_t tbl_size, 767 - int low, int high, int special); 672 + * :: 673 + 674 + bool validate_constant_table(const struct constant_table *tbl, 675 + size_t tbl_size, 676 + int low, int high, int special); 768 677 769 678 Validate a constant table. Checks that all the elements are appropriately 770 679 ordered, that there are no duplicates and that the values are between low ··· 777 682 If all is good, true is returned. If the table is invalid, errors are 778 683 logged to dmesg and false is returned. 779 684 780 - (*) bool fs_validate_description(const struct fs_parameter_description *desc); 685 + * :: 686 + 687 + bool fs_validate_description(const struct fs_parameter_description *desc); 781 688 782 689 This performs some validation checks on a parameter description. It 783 690 returns true if the description is good and false if it is not. It will 784 691 log errors to dmesg if validation fails. 785 692 786 - (*) int fs_parse(struct fs_context *fc, 787 - const struct fs_parameter_description *desc, 788 - struct fs_parameter *param, 789 - struct fs_parse_result *result); 693 + * :: 694 + 695 + int fs_parse(struct fs_context *fc, 696 + const struct fs_parameter_description *desc, 697 + struct fs_parameter *param, 698 + struct fs_parse_result *result); 790 699 791 700 This is the main interpreter of parameters. It uses the parameter 792 701 description to look up a parameter by key name and to convert that to an ··· 810 711 parameter is matched, but the value is erroneous, -EINVAL will be 811 712 returned; otherwise the parameter's option number will be returned. 812 713 813 - (*) int fs_lookup_param(struct fs_context *fc, 814 - struct fs_parameter *value, 815 - bool want_bdev, 816 - struct path *_path); 714 + * :: 715 + 716 + int fs_lookup_param(struct fs_context *fc, 717 + struct fs_parameter *value, 718 + bool want_bdev, 719 + struct path *_path); 817 720 818 721 This takes a parameter that carries a string or filename type and attempts 819 722 to do a path lookup on it. If the parameter expects a blockdev, a check 820 723 is made that the inode actually represents one. 821 724 822 - Returns 0 if successful and *_path will be set; returns a negative error 823 - code if not. 725 + Returns 0 if successful and ``*_path`` will be set; returns a negative 726 + error code if not.
+1 -1
include/linux/fs_context.h
··· 85 85 * Superblock creation fills in ->root whereas reconfiguration begins with this 86 86 * already set. 87 87 * 88 - * See Documentation/filesystems/mount_api.txt 88 + * See Documentation/filesystems/mount_api.rst 89 89 */ 90 90 struct fs_context { 91 91 const struct fs_context_operations *ops;
+1 -1
include/linux/lsm_hooks.h
··· 77 77 * state. This is called immediately after commit_creds(). 78 78 * 79 79 * Security hooks for mount using fs_context. 80 - * [See also Documentation/filesystems/mount_api.txt] 80 + * [See also Documentation/filesystems/mount_api.rst] 81 81 * 82 82 * @fs_context_dup: 83 83 * Allocate and attach a security structure to sc->security. This pointer