Merge tag 'drm-intel-next-2019-03-20' of git://anongit.freedesktop.org/drm/drm-intel...
[sfrench/cifs-2.6.git] / Documentation / filesystems / mount_api.txt
1                              ====================
2                              FILESYSTEM MOUNT API
3                              ====================
4
5 CONTENTS
6
7  (1) Overview.
8
9  (2) The filesystem context.
10
11  (3) The filesystem context operations.
12
13  (4) Filesystem context security.
14
15  (5) VFS filesystem context operations.
16
17  (6) Parameter description.
18
19  (7) Parameter helper functions.
20
21
22 ========
23 OVERVIEW
24 ========
25
26 The creation of new mounts is now to be done in a multistep process:
27
28  (1) Create a filesystem context.
29
30  (2) Parse the parameters and attach them to the context.  Parameters are
31      expected to be passed individually from userspace, though legacy binary
32      parameters can also be handled.
33
34  (3) Validate and pre-process the context.
35
36  (4) Get or create a superblock and mountable root.
37
38  (5) Perform the mount.
39
40  (6) Return an error message attached to the context.
41
42  (7) Destroy the context.
43
44 To support this, the file_system_type struct gains a new field:
45
46         int (*init_fs_context)(struct fs_context *fc);
47
48 which is invoked to set up the filesystem-specific parts of a filesystem
49 context, including the additional space.
50
51 Note that security initialisation is done *after* the filesystem is called so
52 that the namespaces may be adjusted first.
53
54
55 ======================
56 THE FILESYSTEM CONTEXT
57 ======================
58
59 The creation and reconfiguration of a superblock is governed by a filesystem
60 context.  This is represented by the fs_context structure:
61
62         struct fs_context {
63                 const struct fs_context_operations *ops;
64                 struct file_system_type *fs_type;
65                 void                    *fs_private;
66                 struct dentry           *root;
67                 struct user_namespace   *user_ns;
68                 struct net              *net_ns;
69                 const struct cred       *cred;
70                 char                    *source;
71                 char                    *subtype;
72                 void                    *security;
73                 void                    *s_fs_info;
74                 unsigned int            sb_flags;
75                 unsigned int            sb_flags_mask;
76                 enum fs_context_purpose purpose:8;
77                 bool                    sloppy:1;
78                 bool                    silent:1;
79                 ...
80         };
81
82 The fs_context fields are as follows:
83
84  (*) const struct fs_context_operations *ops
85
86      These are operations that can be done on a filesystem context (see
87      below).  This must be set by the ->init_fs_context() file_system_type
88      operation.
89
90  (*) struct file_system_type *fs_type
91
92      A pointer to the file_system_type of the filesystem that is being
93      constructed or reconfigured.  This retains a reference on the type owner.
94
95  (*) void *fs_private
96
97      A pointer to the file system's private data.  This is where the filesystem
98      will need to store any options it parses.
99
100  (*) struct dentry *root
101
102      A pointer to the root of the mountable tree (and indirectly, the
103      superblock thereof).  This is filled in by the ->get_tree() op.  If this
104      is set, an active reference on root->d_sb must also be held.
105
106  (*) struct user_namespace *user_ns
107  (*) struct net *net_ns
108
109      There are a subset of the namespaces in use by the invoking process.  They
110      retain references on each namespace.  The subscribed namespaces may be
111      replaced by the filesystem to reflect other sources, such as the parent
112      mount superblock on an automount.
113
114  (*) const struct cred *cred
115
116      The mounter's credentials.  This retains a reference on the credentials.
117
118  (*) char *source
119
120      This specifies the source.  It may be a block device (e.g. /dev/sda1) or
121      something more exotic, such as the "host:/path" that NFS desires.
122
123  (*) char *subtype
124
125      This is a string to be added to the type displayed in /proc/mounts to
126      qualify it (used by FUSE).  This is available for the filesystem to set if
127      desired.
128
129  (*) void *security
130
131      A place for the LSMs to hang their security data for the superblock.  The
132      relevant security operations are described below.
133
134  (*) void *s_fs_info
135
136      The proposed s_fs_info for a new superblock, set in the superblock by
137      sget_fc().  This can be used to distinguish superblocks.
138
139  (*) unsigned int sb_flags
140  (*) unsigned int sb_flags_mask
141
142      Which bits SB_* flags are to be set/cleared in super_block::s_flags.
143
144  (*) enum fs_context_purpose
145
146      This indicates the purpose for which the context is intended.  The
147      available values are:
148
149         FS_CONTEXT_FOR_MOUNT,           -- New superblock for explicit mount
150         FS_CONTEXT_FOR_SUBMOUNT         -- New automatic submount of extant mount
151         FS_CONTEXT_FOR_RECONFIGURE      -- Change an existing mount
152
153  (*) bool sloppy
154  (*) bool silent
155
156      These are set if the sloppy or silent mount options are given.
157
158      [NOTE] sloppy is probably unnecessary when userspace passes over one
159      option at a time since the error can just be ignored if userspace deems it
160      to be unimportant.
161
162      [NOTE] silent is probably redundant with sb_flags & SB_SILENT.
163
164 The mount context is created by calling vfs_new_fs_context() or
165 vfs_dup_fs_context() and is destroyed with put_fs_context().  Note that the
166 structure is not refcounted.
167
168 VFS, security and filesystem mount options are set individually with
169 vfs_parse_mount_option().  Options provided by the old mount(2) system call as
170 a page of data can be parsed with generic_parse_monolithic().
171
172 When mounting, the filesystem is allowed to take data from any of the pointers
173 and attach it to the superblock (or whatever), provided it clears the pointer
174 in the mount context.
175
176 The filesystem is also allowed to allocate resources and pin them with the
177 mount context.  For instance, NFS might pin the appropriate protocol version
178 module.
179
180
181 =================================
182 THE FILESYSTEM CONTEXT OPERATIONS
183 =================================
184
185 The filesystem context points to a table of operations:
186
187         struct fs_context_operations {
188                 void (*free)(struct fs_context *fc);
189                 int (*dup)(struct fs_context *fc, struct fs_context *src_fc);
190                 int (*parse_param)(struct fs_context *fc,
191                                    struct struct fs_parameter *param);
192                 int (*parse_monolithic)(struct fs_context *fc, void *data);
193                 int (*get_tree)(struct fs_context *fc);
194                 int (*reconfigure)(struct fs_context *fc);
195         };
196
197 These operations are invoked by the various stages of the mount procedure to
198 manage the filesystem context.  They are as follows:
199
200  (*) void (*free)(struct fs_context *fc);
201
202      Called to clean up the filesystem-specific part of the filesystem context
203      when the context is destroyed.  It should be aware that parts of the
204      context may have been removed and NULL'd out by ->get_tree().
205
206  (*) int (*dup)(struct fs_context *fc, struct fs_context *src_fc);
207
208      Called when a filesystem context has been duplicated to duplicate the
209      filesystem-private data.  An error may be returned to indicate failure to
210      do this.
211
212      [!] Note that even if this fails, put_fs_context() will be called
213          immediately thereafter, so ->dup() *must* make the
214          filesystem-private data safe for ->free().
215
216  (*) int (*parse_param)(struct fs_context *fc,
217                         struct struct fs_parameter *param);
218
219      Called when a parameter is being added to the filesystem context.  param
220      points to the key name and maybe a value object.  VFS-specific options
221      will have been weeded out and fc->sb_flags updated in the context.
222      Security options will also have been weeded out and fc->security updated.
223
224      The parameter can be parsed with fs_parse() and fs_lookup_param().  Note
225      that the source(s) are presented as parameters named "source".
226
227      If successful, 0 should be returned or a negative error code otherwise.
228
229  (*) int (*parse_monolithic)(struct fs_context *fc, void *data);
230
231      Called when the mount(2) system call is invoked to pass the entire data
232      page in one go.  If this is expected to be just a list of "key[=val]"
233      items separated by commas, then this may be set to NULL.
234
235      The return value is as for ->parse_param().
236
237      If the filesystem (e.g. NFS) needs to examine the data first and then
238      finds it's the standard key-val list then it may pass it off to
239      generic_parse_monolithic().
240
241  (*) int (*get_tree)(struct fs_context *fc);
242
243      Called to get or create the mountable root and superblock, using the
244      information stored in the filesystem context (reconfiguration goes via a
245      different vector).  It may detach any resources it desires from the
246      filesystem context and transfer them to the superblock it creates.
247
248      On success it should set fc->root to the mountable root and return 0.  In
249      the case of an error, it should return a negative error code.
250
251      The phase on a userspace-driven context will be set to only allow this to
252      be called once on any particular context.
253
254  (*) int (*reconfigure)(struct fs_context *fc);
255
256      Called to effect reconfiguration of a superblock using information stored
257      in the filesystem context.  It may detach any resources it desires from
258      the filesystem context and transfer them to the superblock.  The
259      superblock can be found from fc->root->d_sb.
260
261      On success it should return 0.  In the case of an error, it should return
262      a negative error code.
263
264      [NOTE] reconfigure is intended as a replacement for remount_fs.
265
266
267 ===========================
268 FILESYSTEM CONTEXT SECURITY
269 ===========================
270
271 The filesystem context contains a security pointer that the LSMs can use for
272 building up a security context for the superblock to be mounted.  There are a
273 number of operations used by the new mount code for this purpose:
274
275  (*) int security_fs_context_alloc(struct fs_context *fc,
276                                    struct dentry *reference);
277
278      Called to initialise fc->security (which is preset to NULL) and allocate
279      any resources needed.  It should return 0 on success or a negative error
280      code on failure.
281
282      reference will be non-NULL if the context is being created for superblock
283      reconfiguration (FS_CONTEXT_FOR_RECONFIGURE) in which case it indicates
284      the root dentry of the superblock to be reconfigured.  It will also be
285      non-NULL in the case of a submount (FS_CONTEXT_FOR_SUBMOUNT) in which case
286      it indicates the automount point.
287
288  (*) int security_fs_context_dup(struct fs_context *fc,
289                                  struct fs_context *src_fc);
290
291      Called to initialise fc->security (which is preset to NULL) and allocate
292      any resources needed.  The original filesystem context is pointed to by
293      src_fc and may be used for reference.  It should return 0 on success or a
294      negative error code on failure.
295
296  (*) void security_fs_context_free(struct fs_context *fc);
297
298      Called to clean up anything attached to fc->security.  Note that the
299      contents may have been transferred to a superblock and the pointer cleared
300      during get_tree.
301
302  (*) int security_fs_context_parse_param(struct fs_context *fc,
303                                          struct fs_parameter *param);
304
305      Called for each mount parameter, including the source.  The arguments are
306      as for the ->parse_param() method.  It should return 0 to indicate that
307      the parameter should be passed on to the filesystem, 1 to indicate that
308      the parameter should be discarded or an error to indicate that the
309      parameter should be rejected.
310
311      The value pointed to by param may be modified (if a string) or stolen
312      (provided the value pointer is NULL'd out).  If it is stolen, 1 must be
313      returned to prevent it being passed to the filesystem.
314
315  (*) int security_fs_context_validate(struct fs_context *fc);
316
317      Called after all the options have been parsed to validate the collection
318      as a whole and to do any necessary allocation so that
319      security_sb_get_tree() and security_sb_reconfigure() are less likely to
320      fail.  It should return 0 or a negative error code.
321
322      In the case of reconfiguration, the target superblock will be accessible
323      via fc->root.
324
325  (*) int security_sb_get_tree(struct fs_context *fc);
326
327      Called during the mount procedure to verify that the specified superblock
328      is allowed to be mounted and to transfer the security data there.  It
329      should return 0 or a negative error code.
330
331  (*) void security_sb_reconfigure(struct fs_context *fc);
332
333      Called to apply any reconfiguration to an LSM's context.  It must not
334      fail.  Error checking and resource allocation must be done in advance by
335      the parameter parsing and validation hooks.
336
337  (*) int security_sb_mountpoint(struct fs_context *fc, struct path *mountpoint,
338                                 unsigned int mnt_flags);
339
340      Called during the mount procedure to verify that the root dentry attached
341      to the context is permitted to be attached to the specified mountpoint.
342      It should return 0 on success or a negative error code on failure.
343
344
345 =================================
346 VFS FILESYSTEM CONTEXT OPERATIONS
347 =================================
348
349 There are four operations for creating a filesystem context and
350 one for destroying a context:
351
352  (*) struct fs_context *vfs_new_fs_context(struct file_system_type *fs_type,
353                                            struct dentry *reference,
354                                            unsigned int sb_flags,
355                                            unsigned int sb_flags_mask,
356                                            enum fs_context_purpose purpose);
357
358      Create a filesystem context for a given filesystem type and purpose.  This
359      allocates the filesystem context, sets the superblock flags, initialises
360      the security and calls fs_type->init_fs_context() to initialise the
361      filesystem private data.
362
363      reference can be NULL or it may indicate the root dentry of a superblock
364      that is going to be reconfigured (FS_CONTEXT_FOR_RECONFIGURE) or
365      the automount point that triggered a submount (FS_CONTEXT_FOR_SUBMOUNT).
366      This is provided as a source of namespace information.
367
368  (*) struct fs_context *vfs_dup_fs_context(struct fs_context *src_fc);
369
370      Duplicate a filesystem context, copying any options noted and duplicating
371      or additionally referencing any resources held therein.  This is available
372      for use where a filesystem has to get a mount within a mount, such as NFS4
373      does by internally mounting the root of the target server and then doing a
374      private pathwalk to the target directory.
375
376      The purpose in the new context is inherited from the old one.
377
378  (*) void put_fs_context(struct fs_context *fc);
379
380      Destroy a filesystem context, releasing any resources it holds.  This
381      calls the ->free() operation.  This is intended to be called by anyone who
382      created a filesystem context.
383
384      [!] filesystem contexts are not refcounted, so this causes unconditional
385          destruction.
386
387 In all the above operations, apart from the put op, the return is a mount
388 context pointer or a negative error code.
389
390 For the remaining operations, if an error occurs, a negative error code will be
391 returned.
392
393  (*) int vfs_get_tree(struct fs_context *fc);
394
395      Get or create the mountable root and superblock, using the parameters in
396      the filesystem context to select/configure the superblock.  This invokes
397      the ->validate() op and then the ->get_tree() op.
398
399      [NOTE] ->validate() could perhaps be rolled into ->get_tree() and
400      ->reconfigure().
401
402  (*) struct vfsmount *vfs_create_mount(struct fs_context *fc);
403
404      Create a mount given the parameters in the specified filesystem context.
405      Note that this does not attach the mount to anything.
406
407  (*) int vfs_parse_fs_param(struct fs_context *fc,
408                             struct fs_parameter *param);
409
410      Supply a single mount parameter to the filesystem context.  This include
411      the specification of the source/device which is specified as the "source"
412      parameter (which may be specified multiple times if the filesystem
413      supports that).
414
415      param specifies the parameter key name and the value.  The parameter is
416      first checked to see if it corresponds to a standard mount flag (in which
417      case it is used to set an SB_xxx flag and consumed) or a security option
418      (in which case the LSM consumes it) before it is passed on to the
419      filesystem.
420
421      The parameter value is typed and can be one of:
422
423         fs_value_is_flag,               Parameter not given a value.
424         fs_value_is_string,             Value is a string
425         fs_value_is_blob,               Value is a binary blob
426         fs_value_is_filename,           Value is a filename* + dirfd
427         fs_value_is_filename_empty,     Value is a filename* + dirfd + AT_EMPTY_PATH
428         fs_value_is_file,               Value is an open file (file*)
429
430      If there is a value, that value is stored in a union in the struct in one
431      of param->{string,blob,name,file}.  Note that the function may steal and
432      clear the pointer, but then becomes responsible for disposing of the
433      object.
434
435  (*) int vfs_parse_fs_string(struct fs_context *fc, char *key,
436                              const char *value, size_t v_size);
437
438      A wrapper around vfs_parse_fs_param() that just passes a constant string.
439
440  (*) int generic_parse_monolithic(struct fs_context *fc, void *data);
441
442      Parse a sys_mount() data page, assuming the form to be a text list
443      consisting of key[=val] options separated by commas.  Each item in the
444      list is passed to vfs_mount_option().  This is the default when the
445      ->parse_monolithic() operation is NULL.
446
447
448 =====================
449 PARAMETER DESCRIPTION
450 =====================
451
452 Parameters are described using structures defined in linux/fs_parser.h.
453 There's a core description struct that links everything together:
454
455         struct fs_parameter_description {
456                 const char      name[16];
457                 u8              nr_params;
458                 u8              nr_alt_keys;
459                 u8              nr_enums;
460                 bool            ignore_unknown;
461                 bool            no_source;
462                 const char *const *keys;
463                 const struct constant_table *alt_keys;
464                 const struct fs_parameter_spec *specs;
465                 const struct fs_parameter_enum *enums;
466         };
467
468 For example:
469
470         enum afs_param {
471                 Opt_autocell,
472                 Opt_bar,
473                 Opt_dyn,
474                 Opt_foo,
475                 Opt_source,
476                 nr__afs_params
477         };
478
479         static const struct fs_parameter_description afs_fs_parameters = {
480                 .name           = "kAFS",
481                 .nr_params      = nr__afs_params,
482                 .nr_alt_keys    = ARRAY_SIZE(afs_param_alt_keys),
483                 .nr_enums       = ARRAY_SIZE(afs_param_enums),
484                 .keys           = afs_param_keys,
485                 .alt_keys       = afs_param_alt_keys,
486                 .specs          = afs_param_specs,
487                 .enums          = afs_param_enums,
488         };
489
490 The members are as follows:
491
492  (1) const char name[16];
493
494      The name to be used in error messages generated by the parse helper
495      functions.
496
497  (2) u8 nr_params;
498
499      The number of discrete parameter identifiers.  This indicates the number
500      of elements in the ->types[] array and also limits the values that may be
501      used in the values that the ->keys[] array maps to.
502
503      It is expected that, for example, two parameters that are related, say
504      "acl" and "noacl" with have the same ID, but will be flagged to indicate
505      that one is the inverse of the other.  The value can then be picked out
506      from the parse result.
507
508  (3) const struct fs_parameter_specification *specs;
509
510      Table of parameter specifications, where the entries are of type:
511
512         struct fs_parameter_type {
513                 enum fs_parameter_spec  type:8;
514                 u8                      flags;
515         };
516
517      and the parameter identifier is the index to the array.  'type' indicates
518      the desired value type and must be one of:
519
520         TYPE NAME               EXPECTED VALUE          RESULT IN
521         ======================= ======================= =====================
522         fs_param_is_flag        No value                n/a
523         fs_param_is_bool        Boolean value           result->boolean
524         fs_param_is_u32         32-bit unsigned int     result->uint_32
525         fs_param_is_u32_octal   32-bit octal int        result->uint_32
526         fs_param_is_u32_hex     32-bit hex int          result->uint_32
527         fs_param_is_s32         32-bit signed int       result->int_32
528         fs_param_is_enum        Enum value name         result->uint_32
529         fs_param_is_string      Arbitrary string        param->string
530         fs_param_is_blob        Binary blob             param->blob
531         fs_param_is_blockdev    Blockdev path           * Needs lookup
532         fs_param_is_path        Path                    * Needs lookup
533         fs_param_is_fd          File descriptor         param->file
534
535      And each parameter can be qualified with 'flags':
536
537         fs_param_v_optional     The value is optional
538         fs_param_neg_with_no    If key name is prefixed with "no", it is false
539         fs_param_neg_with_empty If value is "", it is false
540         fs_param_deprecated     The parameter is deprecated.
541
542      For example:
543
544         static const struct fs_parameter_spec afs_param_specs[nr__afs_params] = {
545                 [Opt_autocell]  = { fs_param_is flag },
546                 [Opt_bar]       = { fs_param_is_enum },
547                 [Opt_dyn]       = { fs_param_is flag },
548                 [Opt_foo]       = { fs_param_is_bool, fs_param_neg_with_no },
549                 [Opt_source]    = { fs_param_is_string },
550         };
551
552      Note that if the value is of fs_param_is_bool type, fs_parse() will try
553      to match any string value against "0", "1", "no", "yes", "false", "true".
554
555      [!] NOTE that the table must be sorted according to primary key name so
556          that ->keys[] is also sorted.
557
558  (4) const char *const *keys;
559
560      Table of primary key names for the parameters.  There must be one entry
561      per defined parameter.  The table is optional if ->nr_params is 0.  The
562      table is just an array of names e.g.:
563
564         static const char *const afs_param_keys[nr__afs_params] = {
565                 [Opt_autocell]  = "autocell",
566                 [Opt_bar]       = "bar",
567                 [Opt_dyn]       = "dyn",
568                 [Opt_foo]       = "foo",
569                 [Opt_source]    = "source",
570         };
571
572      [!] NOTE that the table must be sorted such that the table can be searched
573          with bsearch() using strcmp().  This means that the Opt_* values must
574          correspond to the entries in this table.
575
576  (5) const struct constant_table *alt_keys;
577      u8 nr_alt_keys;
578
579      Table of additional key names and their mappings to parameter ID plus the
580      number of elements in the table.  This is optional.  The table is just an
581      array of { name, integer } pairs, e.g.:
582
583         static const struct constant_table afs_param_keys[] = {
584                 { "baz",        Opt_bar },
585                 { "dynamic",    Opt_dyn },
586         };
587
588      [!] NOTE that the table must be sorted such that strcmp() can be used with
589          bsearch() to search the entries.
590
591      The parameter ID can also be fs_param_key_removed to indicate that a
592      deprecated parameter has been removed and that an error will be given.
593      This differs from fs_param_deprecated where the parameter may still have
594      an effect.
595
596      Further, the behaviour of the parameter may differ when an alternate name
597      is used (for instance with NFS, "v3", "v4.2", etc. are alternate names).
598
599  (6) const struct fs_parameter_enum *enums;
600      u8 nr_enums;
601
602      Table of enum value names to integer mappings and the number of elements
603      stored therein.  This is of type:
604
605         struct fs_parameter_enum {
606                 u8              param_id;
607                 char            name[14];
608                 u8              value;
609         };
610
611      Where the array is an unsorted list of { parameter ID, name }-keyed
612      elements that indicate the value to map to, e.g.:
613
614         static const struct fs_parameter_enum afs_param_enums[] = {
615                 { Opt_bar,   "x",      1},
616                 { Opt_bar,   "y",      23},
617                 { Opt_bar,   "z",      42},
618         };
619
620      If a parameter of type fs_param_is_enum is encountered, fs_parse() will
621      try to look the value up in the enum table and the result will be stored
622      in the parse result.
623
624  (7) bool no_source;
625
626      If this is set, fs_parse() will ignore any "source" parameter and not
627      pass it to the filesystem.
628
629 The parser should be pointed to by the parser pointer in the file_system_type
630 struct as this will provide validation on registration (if
631 CONFIG_VALIDATE_FS_PARSER=y) and will allow the description to be queried from
632 userspace using the fsinfo() syscall.
633
634
635 ==========================
636 PARAMETER HELPER FUNCTIONS
637 ==========================
638
639 A number of helper functions are provided to help a filesystem or an LSM
640 process the parameters it is given.
641
642  (*) int lookup_constant(const struct constant_table tbl[],
643                          const char *name, int not_found);
644
645      Look up a constant by name in a table of name -> integer mappings.  The
646      table is an array of elements of the following type:
647
648         struct constant_table {
649                 const char      *name;
650                 int             value;
651         };
652
653      and it must be sorted such that it can be searched using bsearch() using
654      strcmp().  If a match is found, the corresponding value is returned.  If a
655      match isn't found, the not_found value is returned instead.
656
657  (*) bool validate_constant_table(const struct constant_table *tbl,
658                                   size_t tbl_size,
659                                   int low, int high, int special);
660
661      Validate a constant table.  Checks that all the elements are appropriately
662      ordered, that there are no duplicates and that the values are between low
663      and high inclusive, though provision is made for one allowable special
664      value outside of that range.  If no special value is required, special
665      should just be set to lie inside the low-to-high range.
666
667      If all is good, true is returned.  If the table is invalid, errors are
668      logged to dmesg, the stack is dumped and false is returned.
669
670  (*) int fs_parse(struct fs_context *fc,
671                   const struct fs_param_parser *parser,
672                   struct fs_parameter *param,
673                   struct fs_param_parse_result *result);
674
675      This is the main interpreter of parameters.  It uses the parameter
676      description (parser) to look up the name of the parameter to use and to
677      convert that to a parameter ID (stored in result->key).
678
679      If successful, and if the parameter type indicates the result is a
680      boolean, integer or enum type, the value is converted by this function and
681      the result stored in result->{boolean,int_32,uint_32}.
682
683      If a match isn't initially made, the key is prefixed with "no" and no
684      value is present then an attempt will be made to look up the key with the
685      prefix removed.  If this matches a parameter for which the type has flag
686      fs_param_neg_with_no set, then a match will be made and the value will be
687      set to false/0/NULL.
688
689      If the parameter is successfully matched and, optionally, parsed
690      correctly, 1 is returned.  If the parameter isn't matched and
691      parser->ignore_unknown is set, then 0 is returned.  Otherwise -EINVAL is
692      returned.
693
694  (*) bool fs_validate_description(const struct fs_parameter_description *desc);
695
696      This is validates the parameter description.  It returns true if the
697      description is good and false if it is not.
698
699  (*) int fs_lookup_param(struct fs_context *fc,
700                          struct fs_parameter *value,
701                          bool want_bdev,
702                          struct path *_path);
703
704      This takes a parameter that carries a string or filename type and attempts
705      to do a path lookup on it.  If the parameter expects a blockdev, a check
706      is made that the inode actually represents one.
707
708      Returns 0 if successful and *_path will be set; returns a negative error
709      code if not.