€•Œsphinx.addnodes”Œdocument”“”)�”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)�”}”(hhh]”(hŒ pending_xref”“”)�”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…”�”}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ)/translations/zh_CN/filesystems/mount_api”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)�”}”(hhh]”hŒChinese (Traditional)”…”�”}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/zh_TW/filesystems/mount_api”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒItalian”…”�”}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/it_IT/filesystems/mount_api”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒJapanese”…”�”}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/ja_JP/filesystems/mount_api”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒKorean”…”�”}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/ko_KR/filesystems/mount_api”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒPortuguese (Brazilian)”…”�”}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/pt_BR/filesystems/mount_api”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒSpanish”…”�”}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/sp_SP/filesystems/mount_api”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)�”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…”�”}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³ŒC/var/lib/git/docbuild/linux/Documentation/filesystems/mount_api.rst”h´KubhŒsection”“”)�”}”(hhh]”(hŒtitle”“”)�”}”(hŒFilesystem Mount API”h]”hŒFilesystem Mount API”…”�”}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´Kubh¶)�”}”(hŒþCONTENTS (1) Overview. (2) The filesystem context. (3) The filesystem context operations. (4) Filesystem context security. (5) VFS filesystem context API. (6) Superblock creation helpers. (7) Parameter description. (8) Parameter helper functions.”h]”hŒþCONTENTS (1) Overview. (2) The filesystem context. (3) The filesystem context operations. (4) Filesystem context security. (5) VFS filesystem context API. (6) Superblock creation helpers. (7) Parameter description. (8) Parameter helper functions.”…”�”}”hhÝsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1hµhhÊh²hh³hÇh´KubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒOverview”h]”hŒOverview”…”�”}”(hhîh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhëh²hh³hÇh´KubhŒ paragraph”“”)�”}”(hŒDThe creation of new mounts is now to be done in a multistep process:”h]”hŒDThe creation of new mounts is now to be done in a multistep process:”…”�”}”(hhþh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Khhëh²hubhŒ block_quote”“”)�”}”(hX¢(1) Create a filesystem context. (2) Parse the parameters and attach them to the context. Parameters are expected to be passed individually from userspace, though legacy binary parameters can also be handled. (3) Validate and pre-process the context. (4) Get or create a superblock and mountable root. (5) Perform the mount. (6) Return an error message attached to the context. (7) Destroy the context. ”h]”hŒenumerated_list”“”)�”}”(hhh]”(hŒ list_item”“”)�”}”(hŒCreate a filesystem context. ”h]”hý)�”}”(hŒCreate a filesystem context.”h]”hŒCreate a filesystem context.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Khjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj)�”}”(hŒ­Parse the parameters and attach them to the context. Parameters are expected to be passed individually from userspace, though legacy binary parameters can also be handled. ”h]”hý)�”}”(hŒ¬Parse the parameters and attach them to the context. Parameters are expected to be passed individually from userspace, though legacy binary parameters can also be handled.”h]”hŒ¬Parse the parameters and attach them to the context. Parameters are expected to be passed individually from userspace, though legacy binary parameters can also be handled.”…”�”}”(hj5h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K!hj1ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj)�”}”(hŒ&Validate and pre-process the context. ”h]”hý)�”}”(hŒ%Validate and pre-process the context.”h]”hŒ%Validate and pre-process the context.”…”�”}”(hjMh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K%hjIubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj)�”}”(hŒ/Get or create a superblock and mountable root. ”h]”hý)�”}”(hŒ.Get or create a superblock and mountable root.”h]”hŒ.Get or create a superblock and mountable root.”…”�”}”(hjeh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K'hjaubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj)�”}”(hŒPerform the mount. ”h]”hý)�”}”(hŒPerform the mount.”h]”hŒPerform the mount.”…”�”}”(hj}h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K)hjyubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj)�”}”(hŒ1Return an error message attached to the context. ”h]”hý)�”}”(hŒ0Return an error message attached to the context.”h]”hŒ0Return an error message attached to the context.”…”�”}”(hj•h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K+hj‘ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj)�”}”(hŒDestroy the context. ”h]”hý)�”}”(hŒDestroy the context.”h]”hŒDestroy the context.”…”�”}”(hj­h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K-hj©ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubeh}”(h]”h ]”h"]”h$]”h&]”Œenumtype”Œarabic”Œprefix”Œ(”Œsuffix”Œ)”uh1jhjubah}”(h]”h ]”h"]”h$]”h&]”uh1j h³hÇh´Khhëh²hubhý)�”}”(hŒCTo support this, the file_system_type struct gains two new fields::”h]”hŒBTo support this, the file_system_type struct gains two new fields:”…”�”}”(hjÓh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K/hhëh²hubhŒ literal_block”“”)�”}”(hŒaint (*init_fs_context)(struct fs_context *fc); const struct fs_parameter_description *parameters;”h]”hŒaint (*init_fs_context)(struct fs_context *fc); const struct fs_parameter_description *parameters;”…”�”}”hjãsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´K1hhëh²hubhý)�”}”(hŒòThe first is invoked to set up the filesystem-specific parts of a filesystem context, including the additional space, and the second points to the parameter description for validation at registration time and querying by a future system call.”h]”hŒòThe first is invoked to set up the filesystem-specific parts of a filesystem context, including the additional space, and the second points to the parameter description for validation at registration time and querying by a future system call.”…”�”}”(hjñh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K4hhëh²hubhý)�”}”(hŒxNote that security initialisation is done *after* the filesystem is called so that the namespaces may be adjusted first.”h]”(hŒ*Note that security initialisation is done ”…”�”}”(hjÿh²hh³Nh´NubhŒemphasis”“”)�”}”(hŒ*after*”h]”hŒafter”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjÿubhŒG the filesystem is called so that the namespaces may be adjusted first.”…”�”}”(hjÿh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K9hhëh²hubeh}”(h]”Œoverview”ah ]”h"]”Œoverview”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒThe Filesystem context”h]”hŒThe Filesystem context”…”�”}”(hj,h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj)h²hh³hÇh´K>ubhý)�”}”(hŒˆThe creation and reconfiguration of a superblock is governed by a filesystem context. This is represented by the fs_context structure::”h]”hŒ‡The creation and reconfiguration of a superblock is governed by a filesystem context. This is represented by the fs_context structure:”…”�”}”(hj:h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K@hj)h²hubjâ)�”}”(hX£struct fs_context { const struct fs_context_operations *ops; struct file_system_type *fs_type; void *fs_private; struct dentry *root; struct user_namespace *user_ns; struct net *net_ns; const struct cred *cred; char *source; char *subtype; void *security; void *s_fs_info; unsigned int sb_flags; unsigned int sb_flags_mask; unsigned int s_iflags; enum fs_context_purpose purpose:8; ... };”h]”hX£struct fs_context { const struct fs_context_operations *ops; struct file_system_type *fs_type; void *fs_private; struct dentry *root; struct user_namespace *user_ns; struct net *net_ns; const struct cred *cred; char *source; char *subtype; void *security; void *s_fs_info; unsigned int sb_flags; unsigned int sb_flags_mask; unsigned int s_iflags; enum fs_context_purpose purpose:8; ... };”…”�”}”hjHsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´KChj)h²hubhý)�”}”(hŒ%The fs_context fields are as follows:”h]”hŒ%The fs_context fields are as follows:”…”�”}”(hjVh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KVhj)h²hubj )�”}”(hX? * :: const struct fs_context_operations *ops These are operations that can be done on a filesystem context (see below). This must be set by the ->init_fs_context() file_system_type operation. * :: struct file_system_type *fs_type A pointer to the file_system_type of the filesystem that is being constructed or reconfigured. This retains a reference on the type owner. * :: void *fs_private A pointer to the file system's private data. This is where the filesystem will need to store any options it parses. * :: struct dentry *root A pointer to the root of the mountable tree (and indirectly, the superblock thereof). This is filled in by the ->get_tree() op. If this is set, an active reference on root->d_sb must also be held. * :: struct user_namespace *user_ns struct net *net_ns There are a subset of the namespaces in use by the invoking process. They retain references on each namespace. The subscribed namespaces may be replaced by the filesystem to reflect other sources, such as the parent mount superblock on an automount. * :: const struct cred *cred The mounter's credentials. This retains a reference on the credentials. * :: char *source This specifies the source. It may be a block device (e.g. /dev/sda1) or something more exotic, such as the "host:/path" that NFS desires. * :: char *subtype This is a string to be added to the type displayed in /proc/mounts to qualify it (used by FUSE). This is available for the filesystem to set if desired. * :: void *security A place for the LSMs to hang their security data for the superblock. The relevant security operations are described below. * :: void *s_fs_info The proposed s_fs_info for a new superblock, set in the superblock by sget_fc(). This can be used to distinguish superblocks. * :: unsigned int sb_flags unsigned int sb_flags_mask Which bits SB_* flags are to be set/cleared in super_block::s_flags. * :: unsigned int s_iflags These will be bitwise-OR'd with s->s_iflags when a superblock is created. * :: enum fs_context_purpose This indicates the purpose for which the context is intended. The available values are: ========================== ====================================== FS_CONTEXT_FOR_MOUNT, New superblock for explicit mount FS_CONTEXT_FOR_SUBMOUNT New automatic submount of extant mount FS_CONTEXT_FOR_RECONFIGURE Change an existing mount ========================== ====================================== ”h]”hŒ bullet_list”“”)�”}”(hhh]”(j)�”}”(hŒÃ:: const struct fs_context_operations *ops These are operations that can be done on a filesystem context (see below). This must be set by the ->init_fs_context() file_system_type operation. ”h]”(jâ)�”}”(hŒ'const struct fs_context_operations *ops”h]”hŒ'const struct fs_context_operations *ops”…”�”}”hjqsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´KZhjmubhý)�”}”(hŒ“These are operations that can be done on a filesystem context (see below). This must be set by the ->init_fs_context() file_system_type operation.”h]”hŒ“These are operations that can be done on a filesystem context (see below). This must be set by the ->init_fs_context() file_system_type operation.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K\hjmubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjjubj)�”}”(hŒ´:: struct file_system_type *fs_type A pointer to the file_system_type of the filesystem that is being constructed or reconfigured. This retains a reference on the type owner. ”h]”(jâ)�”}”(hŒ struct file_system_type *fs_type”h]”hŒ struct file_system_type *fs_type”…”�”}”hj—sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´Kbhj“ubhý)�”}”(hŒ‹A pointer to the file_system_type of the filesystem that is being constructed or reconfigured. This retains a reference on the type owner.”h]”hŒ‹A pointer to the file_system_type of the filesystem that is being constructed or reconfigured. This retains a reference on the type owner.”…”�”}”(hj¥h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kdhj“ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjjubj)�”}”(hŒ�:: void *fs_private A pointer to the file system's private data. This is where the filesystem will need to store any options it parses. ”h]”(jâ)�”}”(hŒvoid *fs_private”h]”hŒvoid *fs_private”…”�”}”hj½sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´Kihj¹ubhý)�”}”(hŒtA pointer to the file system's private data. This is where the filesystem will need to store any options it parses.”h]”hŒvA pointer to the file system’s private data. This is where the filesystem will need to store any options it parses.”…”�”}”(hjËh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kkhj¹ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjjubj)�”}”(hŒâ:: struct dentry *root A pointer to the root of the mountable tree (and indirectly, the superblock thereof). This is filled in by the ->get_tree() op. If this is set, an active reference on root->d_sb must also be held. ”h]”(jâ)�”}”(hŒstruct dentry *root”h]”hŒstruct dentry *root”…”�”}”hjãsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´Kphjßubhý)�”}”(hŒÆA pointer to the root of the mountable tree (and indirectly, the superblock thereof). This is filled in by the ->get_tree() op. If this is set, an active reference on root->d_sb must also be held.”h]”hŒÆA pointer to the root of the mountable tree (and indirectly, the superblock thereof). This is filled in by the ->get_tree() op. If this is set, an active reference on root->d_sb must also be held.”…”�”}”(hjñh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Krhjßubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjjubj)�”}”(hX7:: struct user_namespace *user_ns struct net *net_ns There are a subset of the namespaces in use by the invoking process. They retain references on each namespace. The subscribed namespaces may be replaced by the filesystem to reflect other sources, such as the parent mount superblock on an automount. ”h]”(jâ)�”}”(hŒ1struct user_namespace *user_ns struct net *net_ns”h]”hŒ1struct user_namespace *user_ns struct net *net_ns”…”�”}”hj sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´Kxhjubhý)�”}”(hŒûThere are a subset of the namespaces in use by the invoking process. They retain references on each namespace. The subscribed namespaces may be replaced by the filesystem to reflect other sources, such as the parent mount superblock on an automount.”h]”hŒûThere are a subset of the namespaces in use by the invoking process. They retain references on each namespace. The subscribed namespaces may be replaced by the filesystem to reflect other sources, such as the parent mount superblock on an automount.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K{hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjjubj)�”}”(hŒh:: const struct cred *cred The mounter's credentials. This retains a reference on the credentials. ”h]”(jâ)�”}”(hŒconst struct cred *cred”h]”hŒconst struct cred *cred”…”�”}”hj/sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´K‚hj+ubhý)�”}”(hŒHThe mounter's credentials. This retains a reference on the credentials.”h]”hŒJThe mounter’s credentials. This retains a reference on the credentials.”…”�”}”(hj=h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K„hj+ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjjubj)�”}”(hŒŸ:: char *source This specifies the source. It may be a block device (e.g. /dev/sda1) or something more exotic, such as the "host:/path" that NFS desires. ”h]”(jâ)�”}”(hŒ char *source”h]”hŒ char *source”…”�”}”hjUsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´KˆhjQubhý)�”}”(hŒŠThis specifies the source. It may be a block device (e.g. /dev/sda1) or something more exotic, such as the "host:/path" that NFS desires.”h]”hŒŽThis specifies the source. It may be a block device (e.g. /dev/sda1) or something more exotic, such as the “host:/pathâ€� that NFS desires.”…”�”}”(hjch²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KŠhjQubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjjubj)�”}”(hŒ¯:: char *subtype This is a string to be added to the type displayed in /proc/mounts to qualify it (used by FUSE). This is available for the filesystem to set if desired. ”h]”(jâ)�”}”(hŒ char *subtype”h]”hŒ char *subtype”…”�”}”hj{sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´K�hjwubhý)�”}”(hŒ™This is a string to be added to the type displayed in /proc/mounts to qualify it (used by FUSE). This is available for the filesystem to set if desired.”h]”hŒ™This is a string to be added to the type displayed in /proc/mounts to qualify it (used by FUSE). This is available for the filesystem to set if desired.”…”�”}”(hj‰h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K‘hjwubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjjubj)�”}”(hŒ’:: void *security A place for the LSMs to hang their security data for the superblock. The relevant security operations are described below. ”h]”(jâ)�”}”(hŒvoid *security”h]”hŒvoid *security”…”�”}”hj¡sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´K—hj�ubhý)�”}”(hŒ{A place for the LSMs to hang their security data for the superblock. The relevant security operations are described below.”h]”hŒ{A place for the LSMs to hang their security data for the superblock. The relevant security operations are described below.”…”�”}”(hj¯h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K™hj�ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjjubj)�”}”(hŒ–:: void *s_fs_info The proposed s_fs_info for a new superblock, set in the superblock by sget_fc(). This can be used to distinguish superblocks. ”h]”(jâ)�”}”(hŒvoid *s_fs_info”h]”hŒvoid *s_fs_info”…”�”}”hjÇsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´KžhjÃubhý)�”}”(hŒ~The proposed s_fs_info for a new superblock, set in the superblock by sget_fc(). This can be used to distinguish superblocks.”h]”hŒ~The proposed s_fs_info for a new superblock, set in the superblock by sget_fc(). This can be used to distinguish superblocks.”…”�”}”(hjÕh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K hjÃubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjjubj)�”}”(hŒ:: unsigned int sb_flags unsigned int sb_flags_mask Which bits SB_* flags are to be set/cleared in super_block::s_flags. ”h]”(jâ)�”}”(hŒ0unsigned int sb_flags unsigned int sb_flags_mask”h]”hŒ0unsigned int sb_flags unsigned int sb_flags_mask”…”�”}”hjísbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´K¥hjéubhý)�”}”(hŒDWhich bits SB_* flags are to be set/cleared in super_block::s_flags.”h]”hŒDWhich bits SB_* flags are to be set/cleared in super_block::s_flags.”…”�”}”(hjûh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K¨hjéubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjjubj)�”}”(hŒg:: unsigned int s_iflags These will be bitwise-OR'd with s->s_iflags when a superblock is created. ”h]”(jâ)�”}”(hŒunsigned int s_iflags”h]”hŒunsigned int s_iflags”…”�”}”hjsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´K¬hjubhý)�”}”(hŒIThese will be bitwise-OR'd with s->s_iflags when a superblock is created.”h]”hŒKThese will be bitwise-OR’d with s->s_iflags when a superblock is created.”…”�”}”(hj!h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K®hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjjubj)�”}”(hXØ:: enum fs_context_purpose This indicates the purpose for which the context is intended. The available values are: ========================== ====================================== FS_CONTEXT_FOR_MOUNT, New superblock for explicit mount FS_CONTEXT_FOR_SUBMOUNT New automatic submount of extant mount FS_CONTEXT_FOR_RECONFIGURE Change an existing mount ========================== ====================================== ”h]”(jâ)�”}”(hŒenum fs_context_purpose”h]”hŒenum fs_context_purpose”…”�”}”hj9sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´K²hj5ubhý)�”}”(hŒXThis indicates the purpose for which the context is intended. The available values are:”h]”hŒXThis indicates the purpose for which the context is intended. The available values are:”…”�”}”(hjGh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K´hj5ubj )�”}”(hXP========================== ====================================== FS_CONTEXT_FOR_MOUNT, New superblock for explicit mount FS_CONTEXT_FOR_SUBMOUNT New automatic submount of extant mount FS_CONTEXT_FOR_RECONFIGURE Change an existing mount ========================== ====================================== ”h]”hŒtable”“”)�”}”(hhh]”hŒtgroup”“”)�”}”(hhh]”(hŒcolspec”“”)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1jchj`ubjd)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”K&uh1jchj`ubhŒtbody”“”)�”}”(hhh]”(hŒrow”“”)�”}”(hhh]”(hŒentry”“”)�”}”(hhh]”hý)�”}”(hŒFS_CONTEXT_FOR_MOUNT,”h]”hŒFS_CONTEXT_FOR_MOUNT,”…”�”}”(hjˆh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K¸hj…ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhj€ubj„)�”}”(hhh]”hý)�”}”(hŒ!New superblock for explicit mount”h]”hŒ!New superblock for explicit mount”…”�”}”(hjŸh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K¸hjœubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhj€ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hj{ubj)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒFS_CONTEXT_FOR_SUBMOUNT”h]”hŒFS_CONTEXT_FOR_SUBMOUNT”…”�”}”(hj¿h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K¹hj¼ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhj¹ubj„)�”}”(hhh]”hý)�”}”(hŒ&New automatic submount of extant mount”h]”hŒ&New automatic submount of extant mount”…”�”}”(hjÖh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K¹hjÓubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhj¹ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hj{ubj)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒFS_CONTEXT_FOR_RECONFIGURE”h]”hŒFS_CONTEXT_FOR_RECONFIGURE”…”�”}”(hjöh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kºhjóubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjðubj„)�”}”(hhh]”hý)�”}”(hŒChange an existing mount”h]”hŒChange an existing mount”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kºhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjðubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hj{ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jyhj`ubeh}”(h]”h ]”h"]”h$]”h&]”Œcols”Kuh1j^hj[ubah}”(h]”h ]”h"]”h$]”h&]”uh1jYhjUubah}”(h]”h ]”h"]”h$]”h&]”uh1j h³hÇh´K·hj5ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjjubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ*”uh1jhh³hÇh´KXhjdubah}”(h]”h ]”h"]”h$]”h&]”uh1j h³hÇh´KXhj)h²hubhý)�”}”(hŒ¨The mount context is created by calling vfs_new_fs_context() or vfs_dup_fs_context() and is destroyed with put_fs_context(). Note that the structure is not refcounted.”h]”hŒ¨The mount context is created by calling vfs_new_fs_context() or vfs_dup_fs_context() and is destroyed with put_fs_context(). Note that the structure is not refcounted.”…”�”}”(hjTh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K½hj)h²hubhý)�”}”(hŒÑVFS, security and filesystem mount options are set individually with vfs_parse_mount_option(). Options provided by the old mount(2) system call as a page of data can be parsed with generic_parse_monolithic().”h]”hŒÑVFS, security and filesystem mount options are set individually with vfs_parse_mount_option(). Options provided by the old mount(2) system call as a page of data can be parsed with generic_parse_monolithic().”…”�”}”(hjbh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KÁhj)h²hubhý)�”}”(hŒ²When mounting, the filesystem is allowed to take data from any of the pointers and attach it to the superblock (or whatever), provided it clears the pointer in the mount context.”h]”hŒ²When mounting, the filesystem is allowed to take data from any of the pointers and attach it to the superblock (or whatever), provided it clears the pointer in the mount context.”…”�”}”(hjph²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KÅhj)h²hubhý)�”}”(hŒŸThe filesystem is also allowed to allocate resources and pin them with the mount context. For instance, NFS might pin the appropriate protocol version module.”h]”hŒŸThe filesystem is also allowed to allocate resources and pin them with the mount context. For instance, NFS might pin the appropriate protocol version module.”…”�”}”(hj~h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KÉhj)h²hubeh}”(h]”Œthe-filesystem-context”ah ]”h"]”Œthe filesystem context”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K>ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ!The Filesystem Context Operations”h]”hŒ!The Filesystem Context Operations”…”�”}”(hj—h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj”h²hh³hÇh´KÏubhý)�”}”(hŒ8The filesystem context points to a table of operations::”h]”hŒ7The filesystem context points to a table of operations:”…”�”}”(hj¥h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KÑhj”h²hubjâ)�”}”(hX¥struct fs_context_operations { void (*free)(struct fs_context *fc); int (*dup)(struct fs_context *fc, struct fs_context *src_fc); int (*parse_param)(struct fs_context *fc, struct fs_parameter *param); int (*parse_monolithic)(struct fs_context *fc, void *data); int (*get_tree)(struct fs_context *fc); int (*reconfigure)(struct fs_context *fc); };”h]”hX¥struct fs_context_operations { void (*free)(struct fs_context *fc); int (*dup)(struct fs_context *fc, struct fs_context *src_fc); int (*parse_param)(struct fs_context *fc, struct fs_parameter *param); int (*parse_monolithic)(struct fs_context *fc, void *data); int (*get_tree)(struct fs_context *fc); int (*reconfigure)(struct fs_context *fc); };”…”�”}”hj³sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´KÓhj”h²hubhý)�”}”(hŒ�These operations are invoked by the various stages of the mount procedure to manage the filesystem context. They are as follows:”h]”hŒ�These operations are invoked by the various stages of the mount procedure to manage the filesystem context. They are as follows:”…”�”}”(hjÁh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KÝhj”h²hubj )�”}”(hX * :: void (*free)(struct fs_context *fc); Called to clean up the filesystem-specific part of the filesystem context when the context is destroyed. It should be aware that parts of the context may have been removed and NULL'd out by ->get_tree(). * :: int (*dup)(struct fs_context *fc, struct fs_context *src_fc); Called when a filesystem context has been duplicated to duplicate the filesystem-private data. An error may be returned to indicate failure to do this. .. Warning:: Note that even if this fails, put_fs_context() will be called immediately thereafter, so ->dup() *must* make the filesystem-private data safe for ->free(). * :: int (*parse_param)(struct fs_context *fc, struct fs_parameter *param); Called when a parameter is being added to the filesystem context. param points to the key name and maybe a value object. VFS-specific options will have been weeded out and fc->sb_flags updated in the context. Security options will also have been weeded out and fc->security updated. The parameter can be parsed with fs_parse() and fs_lookup_param(). Note that the source(s) are presented as parameters named "source". If successful, 0 should be returned or a negative error code otherwise. * :: int (*parse_monolithic)(struct fs_context *fc, void *data); Called when the mount(2) system call is invoked to pass the entire data page in one go. If this is expected to be just a list of "key[=val]" items separated by commas, then this may be set to NULL. The return value is as for ->parse_param(). If the filesystem (e.g. NFS) needs to examine the data first and then finds it's the standard key-val list then it may pass it off to generic_parse_monolithic(). * :: int (*get_tree)(struct fs_context *fc); Called to get or create the mountable root and superblock, using the information stored in the filesystem context (reconfiguration goes via a different vector). It may detach any resources it desires from the filesystem context and transfer them to the superblock it creates. On success it should set fc->root to the mountable root and return 0. In the case of an error, it should return a negative error code. The phase on a userspace-driven context will be set to only allow this to be called once on any particular context. * :: int (*reconfigure)(struct fs_context *fc); Called to effect reconfiguration of a superblock using information stored in the filesystem context. It may detach any resources it desires from the filesystem context and transfer them to the superblock. The superblock can be found from fc->root->d_sb. On success it should return 0. In the case of an error, it should return a negative error code. ”h]”ji)�”}”(hhh]”(j)�”}”(hŒú:: void (*free)(struct fs_context *fc); Called to clean up the filesystem-specific part of the filesystem context when the context is destroyed. It should be aware that parts of the context may have been removed and NULL'd out by ->get_tree(). ”h]”(jâ)�”}”(hŒ$void (*free)(struct fs_context *fc);”h]”hŒ$void (*free)(struct fs_context *fc);”…”�”}”hjÚsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´KâhjÖubhý)�”}”(hŒÌCalled to clean up the filesystem-specific part of the filesystem context when the context is destroyed. It should be aware that parts of the context may have been removed and NULL'd out by ->get_tree().”h]”hŒÎCalled to clean up the filesystem-specific part of the filesystem context when the context is destroyed. It should be aware that parts of the context may have been removed and NULL’d out by ->get_tree().”…”�”}”(hjèh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KähjÖubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjÓubj)�”}”(hX–:: int (*dup)(struct fs_context *fc, struct fs_context *src_fc); Called when a filesystem context has been duplicated to duplicate the filesystem-private data. An error may be returned to indicate failure to do this. .. Warning:: Note that even if this fails, put_fs_context() will be called immediately thereafter, so ->dup() *must* make the filesystem-private data safe for ->free(). ”h]”(jâ)�”}”(hŒ=int (*dup)(struct fs_context *fc, struct fs_context *src_fc);”h]”hŒ=int (*dup)(struct fs_context *fc, struct fs_context *src_fc);”…”�”}”hjsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´Kêhjüubhý)�”}”(hŒ˜Called when a filesystem context has been duplicated to duplicate the filesystem-private data. An error may be returned to indicate failure to do this.”h]”hŒ˜Called when a filesystem context has been duplicated to duplicate the filesystem-private data. An error may be returned to indicate failure to do this.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KìhjüubhŒwarning”“”)�”}”(hŒ›Note that even if this fails, put_fs_context() will be called immediately thereafter, so ->dup() *must* make the filesystem-private data safe for ->free().”h]”hý)�”}”(hŒ›Note that even if this fails, put_fs_context() will be called immediately thereafter, so ->dup() *must* make the filesystem-private data safe for ->free().”h]”(hŒaNote that even if this fails, put_fs_context() will be called immediately thereafter, so ->dup() ”…”�”}”(hj"h²hh³Nh´Nubj)�”}”(hŒ*must*”h]”hŒmust”…”�”}”(hj*h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj"ubhŒ4 make the filesystem-private data safe for ->free().”…”�”}”(hj"h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kòhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjüubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjÓubj)�”}”(hXT:: int (*parse_param)(struct fs_context *fc, struct fs_parameter *param); Called when a parameter is being added to the filesystem context. param points to the key name and maybe a value object. VFS-specific options will have been weeded out and fc->sb_flags updated in the context. Security options will also have been weeded out and fc->security updated. The parameter can be parsed with fs_parse() and fs_lookup_param(). Note that the source(s) are presented as parameters named "source". If successful, 0 should be returned or a negative error code otherwise. ”h]”(jâ)�”}”(hŒYint (*parse_param)(struct fs_context *fc, struct fs_parameter *param);”h]”hŒYint (*parse_param)(struct fs_context *fc, struct fs_parameter *param);”…”�”}”hjRsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´KøhjNubhý)�”}”(hXCalled when a parameter is being added to the filesystem context. param points to the key name and maybe a value object. VFS-specific options will have been weeded out and fc->sb_flags updated in the context. Security options will also have been weeded out and fc->security updated.”h]”hXCalled when a parameter is being added to the filesystem context. param points to the key name and maybe a value object. VFS-specific options will have been weeded out and fc->sb_flags updated in the context. Security options will also have been weeded out and fc->security updated.”…”�”}”(hj`h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KûhjNubhý)�”}”(hŒ‡The parameter can be parsed with fs_parse() and fs_lookup_param(). Note that the source(s) are presented as parameters named "source".”h]”hŒ‹The parameter can be parsed with fs_parse() and fs_lookup_param(). Note that the source(s) are presented as parameters named “sourceâ€�.”…”�”}”(hjnh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MhjNubhý)�”}”(hŒGIf successful, 0 should be returned or a negative error code otherwise.”h]”hŒGIf successful, 0 should be returned or a negative error code otherwise.”…”�”}”(hj|h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MhjNubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjÓubj)�”}”(hXÛ:: int (*parse_monolithic)(struct fs_context *fc, void *data); Called when the mount(2) system call is invoked to pass the entire data page in one go. If this is expected to be just a list of "key[=val]" items separated by commas, then this may be set to NULL. The return value is as for ->parse_param(). If the filesystem (e.g. NFS) needs to examine the data first and then finds it's the standard key-val list then it may pass it off to generic_parse_monolithic(). ”h]”(jâ)�”}”(hŒ;int (*parse_monolithic)(struct fs_context *fc, void *data);”h]”hŒ;int (*parse_monolithic)(struct fs_context *fc, void *data);”…”�”}”hj”sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´Mhj�ubhý)�”}”(hŒÆCalled when the mount(2) system call is invoked to pass the entire data page in one go. If this is expected to be just a list of "key[=val]" items separated by commas, then this may be set to NULL.”h]”hŒÊCalled when the mount(2) system call is invoked to pass the entire data page in one go. If this is expected to be just a list of “key[=val]â€� items separated by commas, then this may be set to NULL.”…”�”}”(hj¢h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M hj�ubhý)�”}”(hŒ+The return value is as for ->parse_param().”h]”hŒ+The return value is as for ->parse_param().”…”�”}”(hj°h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M hj�ubhý)�”}”(hŒ¡If the filesystem (e.g. NFS) needs to examine the data first and then finds it's the standard key-val list then it may pass it off to generic_parse_monolithic().”h]”hŒ£If the filesystem (e.g. NFS) needs to examine the data first and then finds it’s the standard key-val list then it may pass it off to generic_parse_monolithic().”…”�”}”(hj¾h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mhj�ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjÓubj)�”}”(hXC:: int (*get_tree)(struct fs_context *fc); Called to get or create the mountable root and superblock, using the information stored in the filesystem context (reconfiguration goes via a different vector). It may detach any resources it desires from the filesystem context and transfer them to the superblock it creates. On success it should set fc->root to the mountable root and return 0. In the case of an error, it should return a negative error code. The phase on a userspace-driven context will be set to only allow this to be called once on any particular context. ”h]”(jâ)�”}”(hŒ'int (*get_tree)(struct fs_context *fc);”h]”hŒ'int (*get_tree)(struct fs_context *fc);”…”�”}”hjÖsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´MhjÒubhý)�”}”(hXCalled to get or create the mountable root and superblock, using the information stored in the filesystem context (reconfiguration goes via a different vector). It may detach any resources it desires from the filesystem context and transfer them to the superblock it creates.”h]”hXCalled to get or create the mountable root and superblock, using the information stored in the filesystem context (reconfiguration goes via a different vector). It may detach any resources it desires from the filesystem context and transfer them to the superblock it creates.”…”�”}”(hjäh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MhjÒubhý)�”}”(hŒ‡On success it should set fc->root to the mountable root and return 0. In the case of an error, it should return a negative error code.”h]”hŒ‡On success it should set fc->root to the mountable root and return 0. In the case of an error, it should return a negative error code.”…”�”}”(hjòh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MhjÒubhý)�”}”(hŒsThe phase on a userspace-driven context will be set to only allow this to be called once on any particular context.”h]”hŒsThe phase on a userspace-driven context will be set to only allow this to be called once on any particular context.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MhjÒubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjÓubj)�”}”(hX–:: int (*reconfigure)(struct fs_context *fc); Called to effect reconfiguration of a superblock using information stored in the filesystem context. It may detach any resources it desires from the filesystem context and transfer them to the superblock. The superblock can be found from fc->root->d_sb. On success it should return 0. In the case of an error, it should return a negative error code. ”h]”(jâ)�”}”(hŒ*int (*reconfigure)(struct fs_context *fc);”h]”hŒ*int (*reconfigure)(struct fs_context *fc);”…”�”}”hjsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´M$hjubhý)�”}”(hŒÿCalled to effect reconfiguration of a superblock using information stored in the filesystem context. It may detach any resources it desires from the filesystem context and transfer them to the superblock. The superblock can be found from fc->root->d_sb.”h]”hŒÿCalled to effect reconfiguration of a superblock using information stored in the filesystem context. It may detach any resources it desires from the filesystem context and transfer them to the superblock. The superblock can be found from fc->root->d_sb.”…”�”}”(hj&h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M&hjubhý)�”}”(hŒ`On success it should return 0. In the case of an error, it should return a negative error code.”h]”hŒ`On success it should return 0. In the case of an error, it should return a negative error code.”…”�”}”(hj4h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M+hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjÓubeh}”(h]”h ]”h"]”h$]”h&]”jLjMuh1jhh³hÇh´KàhjÏubah}”(h]”h ]”h"]”h$]”h&]”uh1j h³hÇh´Kàhj”h²hubeh}”(h]”Œ!the-filesystem-context-operations”ah ]”h"]”Œ!the filesystem context operations”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KÏubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒFilesystem context Security”h]”hŒFilesystem context Security”…”�”}”(hj_h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj\h²hh³hÇh´M0ubhý)�”}”(hŒÜThe filesystem context contains a security pointer that the LSMs can use for building up a security context for the superblock to be mounted. There are a number of operations used by the new mount code for this purpose:”h]”hŒÜThe filesystem context contains a security pointer that the LSMs can use for building up a security context for the superblock to be mounted. There are a number of operations used by the new mount code for this purpose:”…”�”}”(hjmh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M2hj\h²hubj )�”}”(hXµ * :: int security_fs_context_alloc(struct fs_context *fc, struct dentry *reference); Called to initialise fc->security (which is preset to NULL) and allocate any resources needed. It should return 0 on success or a negative error code on failure. reference will be non-NULL if the context is being created for superblock reconfiguration (FS_CONTEXT_FOR_RECONFIGURE) in which case it indicates the root dentry of the superblock to be reconfigured. It will also be non-NULL in the case of a submount (FS_CONTEXT_FOR_SUBMOUNT) in which case it indicates the automount point. * :: int security_fs_context_dup(struct fs_context *fc, struct fs_context *src_fc); Called to initialise fc->security (which is preset to NULL) and allocate any resources needed. The original filesystem context is pointed to by src_fc and may be used for reference. It should return 0 on success or a negative error code on failure. * :: void security_fs_context_free(struct fs_context *fc); Called to clean up anything attached to fc->security. Note that the contents may have been transferred to a superblock and the pointer cleared during get_tree. * :: int security_fs_context_parse_param(struct fs_context *fc, struct fs_parameter *param); Called for each mount parameter, including the source. The arguments are as for the ->parse_param() method. It should return 0 to indicate that the parameter should be passed on to the filesystem, 1 to indicate that the parameter should be discarded or an error to indicate that the parameter should be rejected. The value pointed to by param may be modified (if a string) or stolen (provided the value pointer is NULL'd out). If it is stolen, 1 must be returned to prevent it being passed to the filesystem. * :: int security_fs_context_validate(struct fs_context *fc); Called after all the options have been parsed to validate the collection as a whole and to do any necessary allocation so that security_sb_get_tree() and security_sb_reconfigure() are less likely to fail. It should return 0 or a negative error code. In the case of reconfiguration, the target superblock will be accessible via fc->root. * :: int security_sb_get_tree(struct fs_context *fc); Called during the mount procedure to verify that the specified superblock is allowed to be mounted and to transfer the security data there. It should return 0 or a negative error code. * :: void security_sb_reconfigure(struct fs_context *fc); Called to apply any reconfiguration to an LSM's context. It must not fail. Error checking and resource allocation must be done in advance by the parameter parsing and validation hooks. * :: int security_sb_mountpoint(struct fs_context *fc, struct path *mountpoint, unsigned int mnt_flags); Called during the mount procedure to verify that the root dentry attached to the context is permitted to be attached to the specified mountpoint. It should return 0 on success or a negative error code on failure. ”h]”ji)�”}”(hhh]”(j)�”}”(hXc:: int security_fs_context_alloc(struct fs_context *fc, struct dentry *reference); Called to initialise fc->security (which is preset to NULL) and allocate any resources needed. It should return 0 on success or a negative error code on failure. reference will be non-NULL if the context is being created for superblock reconfiguration (FS_CONTEXT_FOR_RECONFIGURE) in which case it indicates the root dentry of the superblock to be reconfigured. It will also be non-NULL in the case of a submount (FS_CONTEXT_FOR_SUBMOUNT) in which case it indicates the automount point. ”h]”(jâ)�”}”(hŒmint security_fs_context_alloc(struct fs_context *fc, struct dentry *reference);”h]”hŒmint security_fs_context_alloc(struct fs_context *fc, struct dentry *reference);”…”�”}”hj†sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´M8hj‚ubhý)�”}”(hŒ¢Called to initialise fc->security (which is preset to NULL) and allocate any resources needed. It should return 0 on success or a negative error code on failure.”h]”hŒ¢Called to initialise fc->security (which is preset to NULL) and allocate any resources needed. It should return 0 on success or a negative error code on failure.”…”�”}”(hj”h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M;hj‚ubhý)�”}”(hXEreference will be non-NULL if the context is being created for superblock reconfiguration (FS_CONTEXT_FOR_RECONFIGURE) in which case it indicates the root dentry of the superblock to be reconfigured. It will also be non-NULL in the case of a submount (FS_CONTEXT_FOR_SUBMOUNT) in which case it indicates the automount point.”h]”hXEreference will be non-NULL if the context is being created for superblock reconfiguration (FS_CONTEXT_FOR_RECONFIGURE) in which case it indicates the root dentry of the superblock to be reconfigured. It will also be non-NULL in the case of a submount (FS_CONTEXT_FOR_SUBMOUNT) in which case it indicates the automount point.”…”�”}”(hj¢h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M?hj‚ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj)�”}”(hXq:: int security_fs_context_dup(struct fs_context *fc, struct fs_context *src_fc); Called to initialise fc->security (which is preset to NULL) and allocate any resources needed. The original filesystem context is pointed to by src_fc and may be used for reference. It should return 0 on success or a negative error code on failure. ”h]”(jâ)�”}”(hŒjint security_fs_context_dup(struct fs_context *fc, struct fs_context *src_fc);”h]”hŒjint security_fs_context_dup(struct fs_context *fc, struct fs_context *src_fc);”…”�”}”hjºsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´MGhj¶ubhý)�”}”(hŒúCalled to initialise fc->security (which is preset to NULL) and allocate any resources needed. The original filesystem context is pointed to by src_fc and may be used for reference. It should return 0 on success or a negative error code on failure.”h]”hŒúCalled to initialise fc->security (which is preset to NULL) and allocate any resources needed. The original filesystem context is pointed to by src_fc and may be used for reference. It should return 0 on success or a negative error code on failure.”…”�”}”(hjÈh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MJhj¶ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj)�”}”(hŒß:: void security_fs_context_free(struct fs_context *fc); Called to clean up anything attached to fc->security. Note that the contents may have been transferred to a superblock and the pointer cleared during get_tree. ”h]”(jâ)�”}”(hŒ5void security_fs_context_free(struct fs_context *fc);”h]”hŒ5void security_fs_context_free(struct fs_context *fc);”…”�”}”hjàsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´MQhjÜubhý)�”}”(hŒ Called to clean up anything attached to fc->security. Note that the contents may have been transferred to a superblock and the pointer cleared during get_tree.”h]”hŒ Called to clean up anything attached to fc->security. Note that the contents may have been transferred to a superblock and the pointer cleared during get_tree.”…”�”}”(hjîh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MShjÜubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj)�”}”(hXˆ:: int security_fs_context_parse_param(struct fs_context *fc, struct fs_parameter *param); Called for each mount parameter, including the source. The arguments are as for the ->parse_param() method. It should return 0 to indicate that the parameter should be passed on to the filesystem, 1 to indicate that the parameter should be discarded or an error to indicate that the parameter should be rejected. The value pointed to by param may be modified (if a string) or stolen (provided the value pointer is NULL'd out). If it is stolen, 1 must be returned to prevent it being passed to the filesystem. ”h]”(jâ)�”}”(hŒ{int security_fs_context_parse_param(struct fs_context *fc, struct fs_parameter *param);”h]”hŒ{int security_fs_context_parse_param(struct fs_context *fc, struct fs_parameter *param);”…”�”}”hjsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´MYhjubhý)�”}”(hX:Called for each mount parameter, including the source. The arguments are as for the ->parse_param() method. It should return 0 to indicate that the parameter should be passed on to the filesystem, 1 to indicate that the parameter should be discarded or an error to indicate that the parameter should be rejected.”h]”hX:Called for each mount parameter, including the source. The arguments are as for the ->parse_param() method. It should return 0 to indicate that the parameter should be passed on to the filesystem, 1 to indicate that the parameter should be discarded or an error to indicate that the parameter should be rejected.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M\hjubhý)�”}”(hŒÄThe value pointed to by param may be modified (if a string) or stolen (provided the value pointer is NULL'd out). If it is stolen, 1 must be returned to prevent it being passed to the filesystem.”h]”hŒÆThe value pointed to by param may be modified (if a string) or stolen (provided the value pointer is NULL’d out). If it is stolen, 1 must be returned to prevent it being passed to the filesystem.”…”�”}”(hj"h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mbhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj)�”}”(hX”:: int security_fs_context_validate(struct fs_context *fc); Called after all the options have been parsed to validate the collection as a whole and to do any necessary allocation so that security_sb_get_tree() and security_sb_reconfigure() are less likely to fail. It should return 0 or a negative error code. In the case of reconfiguration, the target superblock will be accessible via fc->root. ”h]”(jâ)�”}”(hŒ8int security_fs_context_validate(struct fs_context *fc);”h]”hŒ8int security_fs_context_validate(struct fs_context *fc);”…”�”}”hj:sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´Mhhj6ubhý)�”}”(hŒúCalled after all the options have been parsed to validate the collection as a whole and to do any necessary allocation so that security_sb_get_tree() and security_sb_reconfigure() are less likely to fail. It should return 0 or a negative error code.”h]”hŒúCalled after all the options have been parsed to validate the collection as a whole and to do any necessary allocation so that security_sb_get_tree() and security_sb_reconfigure() are less likely to fail. It should return 0 or a negative error code.”…”�”}”(hjHh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mjhj6ubhý)�”}”(hŒVIn the case of reconfiguration, the target superblock will be accessible via fc->root.”h]”hŒVIn the case of reconfiguration, the target superblock will be accessible via fc->root.”…”�”}”(hjVh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mohj6ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj)�”}”(hŒó:: int security_sb_get_tree(struct fs_context *fc); Called during the mount procedure to verify that the specified superblock is allowed to be mounted and to transfer the security data there. It should return 0 or a negative error code. ”h]”(jâ)�”}”(hŒ0int security_sb_get_tree(struct fs_context *fc);”h]”hŒ0int security_sb_get_tree(struct fs_context *fc);”…”�”}”hjnsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´Mthjjubhý)�”}”(hŒ¹Called during the mount procedure to verify that the specified superblock is allowed to be mounted and to transfer the security data there. It should return 0 or a negative error code.”h]”hŒ¹Called during the mount procedure to verify that the specified superblock is allowed to be mounted and to transfer the security data there. It should return 0 or a negative error code.”…”�”}”(hj|h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mvhjjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj)�”}”(hŒø:: void security_sb_reconfigure(struct fs_context *fc); Called to apply any reconfiguration to an LSM's context. It must not fail. Error checking and resource allocation must be done in advance by the parameter parsing and validation hooks. ”h]”(jâ)�”}”(hŒ4void security_sb_reconfigure(struct fs_context *fc);”h]”hŒ4void security_sb_reconfigure(struct fs_context *fc);”…”�”}”hj”sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´M|hj�ubhý)�”}”(hŒºCalled to apply any reconfiguration to an LSM's context. It must not fail. Error checking and resource allocation must be done in advance by the parameter parsing and validation hooks.”h]”hŒ¼Called to apply any reconfiguration to an LSM’s context. It must not fail. Error checking and resource allocation must be done in advance by the parameter parsing and validation hooks.”…”�”}”(hj¢h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M~hj�ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj)�”}”(hX~:: int security_sb_mountpoint(struct fs_context *fc, struct path *mountpoint, unsigned int mnt_flags); Called during the mount procedure to verify that the root dentry attached to the context is permitted to be attached to the specified mountpoint. It should return 0 on success or a negative error code on failure. ”h]”(jâ)�”}”(hŒ™int security_sb_mountpoint(struct fs_context *fc, struct path *mountpoint, unsigned int mnt_flags);”h]”hŒ™int security_sb_mountpoint(struct fs_context *fc, struct path *mountpoint, unsigned int mnt_flags);”…”�”}”hjºsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´M„hj¶ubhý)�”}”(hŒÔCalled during the mount procedure to verify that the root dentry attached to the context is permitted to be attached to the specified mountpoint. It should return 0 on success or a negative error code on failure.”h]”hŒÔCalled during the mount procedure to verify that the root dentry attached to the context is permitted to be attached to the specified mountpoint. It should return 0 on success or a negative error code on failure.”…”�”}”(hjÈh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mˆhj¶ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjubeh}”(h]”h ]”h"]”h$]”h&]”jLjMuh1jhh³hÇh´M6hj{ubah}”(h]”h ]”h"]”h$]”h&]”uh1j h³hÇh´M6hj\h²hubeh}”(h]”Œfilesystem-context-security”ah ]”h"]”Œfilesystem context security”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´M0ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒVFS Filesystem context API”h]”hŒVFS Filesystem context API”…”�”}”(hjóh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjðh²hh³hÇh´MŽubhý)�”}”(hŒ]There are four operations for creating a filesystem context and one for destroying a context:”h]”hŒ]There are four operations for creating a filesystem context and one for destroying a context:”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M�hjðh²hubj )�”}”(hXa * :: struct fs_context *fs_context_for_mount(struct file_system_type *fs_type, unsigned int sb_flags); Allocate a filesystem context for the purpose of setting up a new mount, whether that be with a new superblock or sharing an existing one. This sets the superblock flags, initialises the security and calls fs_type->init_fs_context() to initialise the filesystem private data. fs_type specifies the filesystem type that will manage the context and sb_flags presets the superblock flags stored therein. * :: struct fs_context *fs_context_for_reconfigure( struct dentry *dentry, unsigned int sb_flags, unsigned int sb_flags_mask); Allocate a filesystem context for the purpose of reconfiguring an existing superblock. dentry provides a reference to the superblock to be configured. sb_flags and sb_flags_mask indicate which superblock flags need changing and to what. * :: struct fs_context *fs_context_for_submount( struct file_system_type *fs_type, struct dentry *reference); Allocate a filesystem context for the purpose of creating a new mount for an automount point or other derived superblock. fs_type specifies the filesystem type that will manage the context and the reference dentry supplies the parameters. Namespaces are propagated from the reference dentry's superblock also. Note that it's not a requirement that the reference dentry be of the same filesystem type as fs_type. * :: struct fs_context *vfs_dup_fs_context(struct fs_context *src_fc); Duplicate a filesystem context, copying any options noted and duplicating or additionally referencing any resources held therein. This is available for use where a filesystem has to get a mount within a mount, such as NFS4 does by internally mounting the root of the target server and then doing a private pathwalk to the target directory. The purpose in the new context is inherited from the old one. * :: void put_fs_context(struct fs_context *fc); Destroy a filesystem context, releasing any resources it holds. This calls the ->free() operation. This is intended to be called by anyone who created a filesystem context. .. Warning:: filesystem contexts are not refcounted, so this causes unconditional destruction. ”h]”ji)�”}”(hhh]”(j)�”}”(hX&:: struct fs_context *fs_context_for_mount(struct file_system_type *fs_type, unsigned int sb_flags); Allocate a filesystem context for the purpose of setting up a new mount, whether that be with a new superblock or sharing an existing one. This sets the superblock flags, initialises the security and calls fs_type->init_fs_context() to initialise the filesystem private data. fs_type specifies the filesystem type that will manage the context and sb_flags presets the superblock flags stored therein. ”h]”(jâ)�”}”(hŒ‰struct fs_context *fs_context_for_mount(struct file_system_type *fs_type, unsigned int sb_flags);”h]”hŒ‰struct fs_context *fs_context_for_mount(struct file_system_type *fs_type, unsigned int sb_flags);”…”�”}”hj sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´M•hj ubhý)�”}”(hXAllocate a filesystem context for the purpose of setting up a new mount, whether that be with a new superblock or sharing an existing one. This sets the superblock flags, initialises the security and calls fs_type->init_fs_context() to initialise the filesystem private data.”h]”hXAllocate a filesystem context for the purpose of setting up a new mount, whether that be with a new superblock or sharing an existing one. This sets the superblock flags, initialises the security and calls fs_type->init_fs_context() to initialise the filesystem private data.”…”�”}”(hj( h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M˜hj ubhý)�”}”(hŒ|fs_type specifies the filesystem type that will manage the context and sb_flags presets the superblock flags stored therein.”h]”hŒ|fs_type specifies the filesystem type that will manage the context and sb_flags presets the superblock flags stored therein.”…”�”}”(hj6 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M�hj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj ubj)�”}”(hX‘:: struct fs_context *fs_context_for_reconfigure( struct dentry *dentry, unsigned int sb_flags, unsigned int sb_flags_mask); Allocate a filesystem context for the purpose of reconfiguring an existing superblock. dentry provides a reference to the superblock to be configured. sb_flags and sb_flags_mask indicate which superblock flags need changing and to what. ”h]”(jâ)�”}”(hŒ”struct fs_context *fs_context_for_reconfigure( struct dentry *dentry, unsigned int sb_flags, unsigned int sb_flags_mask);”h]”hŒ”struct fs_context *fs_context_for_reconfigure( struct dentry *dentry, unsigned int sb_flags, unsigned int sb_flags_mask);”…”�”}”hjN sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´M¢hjJ ubhý)�”}”(hŒîAllocate a filesystem context for the purpose of reconfiguring an existing superblock. dentry provides a reference to the superblock to be configured. sb_flags and sb_flags_mask indicate which superblock flags need changing and to what.”h]”hŒîAllocate a filesystem context for the purpose of reconfiguring an existing superblock. dentry provides a reference to the superblock to be configured. sb_flags and sb_flags_mask indicate which superblock flags need changing and to what.”…”�”}”(hj\ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M§hjJ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj ubj)�”}”(hX%:: struct fs_context *fs_context_for_submount( struct file_system_type *fs_type, struct dentry *reference); Allocate a filesystem context for the purpose of creating a new mount for an automount point or other derived superblock. fs_type specifies the filesystem type that will manage the context and the reference dentry supplies the parameters. Namespaces are propagated from the reference dentry's superblock also. Note that it's not a requirement that the reference dentry be of the same filesystem type as fs_type. ”h]”(jâ)�”}”(hŒzstruct fs_context *fs_context_for_submount( struct file_system_type *fs_type, struct dentry *reference);”h]”hŒzstruct fs_context *fs_context_for_submount( struct file_system_type *fs_type, struct dentry *reference);”…”�”}”hjt sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´M®hjp ubhý)�”}”(hX7Allocate a filesystem context for the purpose of creating a new mount for an automount point or other derived superblock. fs_type specifies the filesystem type that will manage the context and the reference dentry supplies the parameters. Namespaces are propagated from the reference dentry's superblock also.”h]”hX9Allocate a filesystem context for the purpose of creating a new mount for an automount point or other derived superblock. fs_type specifies the filesystem type that will manage the context and the reference dentry supplies the parameters. Namespaces are propagated from the reference dentry’s superblock also.”…”�”•ª}”(hj‚ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M²hjp ubhý)�”}”(hŒeNote that it's not a requirement that the reference dentry be of the same filesystem type as fs_type.”h]”hŒgNote that it’s not a requirement that the reference dentry be of the same filesystem type as fs_type.”…”�”}”(hj� h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M¸hjp ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj ubj)�”}”(hXÞ:: struct fs_context *vfs_dup_fs_context(struct fs_context *src_fc); Duplicate a filesystem context, copying any options noted and duplicating or additionally referencing any resources held therein. This is available for use where a filesystem has to get a mount within a mount, such as NFS4 does by internally mounting the root of the target server and then doing a private pathwalk to the target directory. The purpose in the new context is inherited from the old one. ”h]”(jâ)�”}”(hŒAstruct fs_context *vfs_dup_fs_context(struct fs_context *src_fc);”h]”hŒAstruct fs_context *vfs_dup_fs_context(struct fs_context *src_fc);”…”�”}”hj¨ sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´M½hj¤ ubhý)�”}”(hXTDuplicate a filesystem context, copying any options noted and duplicating or additionally referencing any resources held therein. This is available for use where a filesystem has to get a mount within a mount, such as NFS4 does by internally mounting the root of the target server and then doing a private pathwalk to the target directory.”h]”hXTDuplicate a filesystem context, copying any options noted and duplicating or additionally referencing any resources held therein. This is available for use where a filesystem has to get a mount within a mount, such as NFS4 does by internally mounting the root of the target server and then doing a private pathwalk to the target directory.”…”�”}”(hj¶ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M¿hj¤ ubhý)�”}”(hŒ=The purpose in the new context is inherited from the old one.”h]”hŒ=The purpose in the new context is inherited from the old one.”…”�”}”(hjÄ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MÅhj¤ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj ubj)�”}”(hXI:: void put_fs_context(struct fs_context *fc); Destroy a filesystem context, releasing any resources it holds. This calls the ->free() operation. This is intended to be called by anyone who created a filesystem context. .. Warning:: filesystem contexts are not refcounted, so this causes unconditional destruction. ”h]”(jâ)�”}”(hŒ+void put_fs_context(struct fs_context *fc);”h]”hŒ+void put_fs_context(struct fs_context *fc);”…”�”}”hjÜ sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´MÉhjØ ubhý)�”}”(hŒ®Destroy a filesystem context, releasing any resources it holds. This calls the ->free() operation. This is intended to be called by anyone who created a filesystem context.”h]”hŒ®Destroy a filesystem context, releasing any resources it holds. This calls the ->free() operation. This is intended to be called by anyone who created a filesystem context.”…”�”}”(hjê h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MËhjØ ubj)�”}”(hŒQfilesystem contexts are not refcounted, so this causes unconditional destruction.”h]”hý)�”}”(hŒQfilesystem contexts are not refcounted, so this causes unconditional destruction.”h]”hŒQfilesystem contexts are not refcounted, so this causes unconditional destruction.”…”�”}”(hjü h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MÑhjø ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjØ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj ubeh}”(h]”h ]”h"]”h$]”h&]”jLjMuh1jhh³hÇh´M“hj ubah}”(h]”h ]”h"]”h$]”h&]”uh1j h³hÇh´M“hjðh²hubhý)�”}”(hŒsIn all the above operations, apart from the put op, the return is a mount context pointer or a negative error code.”h]”hŒsIn all the above operations, apart from the put op, the return is a mount context pointer or a negative error code.”…”�”}”(hj" h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MÔhjðh²hubhý)�”}”(hŒYFor the remaining operations, if an error occurs, a negative error code will be returned.”h]”hŒYFor the remaining operations, if an error occurs, a negative error code will be returned.”…”�”}”(hj0 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M×hjðh²hubj )�”}”(hX * :: int vfs_parse_fs_param(struct fs_context *fc, struct fs_parameter *param); Supply a single mount parameter to the filesystem context. This includes the specification of the source/device which is specified as the "source" parameter (which may be specified multiple times if the filesystem supports that). param specifies the parameter key name and the value. The parameter is first checked to see if it corresponds to a standard mount flag (in which case it is used to set an SB_xxx flag and consumed) or a security option (in which case the LSM consumes it) before it is passed on to the filesystem. The parameter value is typed and can be one of: ==================== ============================= fs_value_is_flag Parameter not given a value fs_value_is_string Value is a string fs_value_is_blob Value is a binary blob fs_value_is_filename Value is a filename* + dirfd fs_value_is_file Value is an open file (file*) ==================== ============================= If there is a value, that value is stored in a union in the struct in one of param->{string,blob,name,file}. Note that the function may steal and clear the pointer, but then becomes responsible for disposing of the object. * :: int vfs_parse_fs_qstr(struct fs_context *fc, const char *key, const struct qstr *value); A wrapper around vfs_parse_fs_param() that copies the value string it is passed. * :: int vfs_parse_fs_string(struct fs_context *fc, const char *key, const char *value); A wrapper around vfs_parse_fs_param() that copies the value string it is passed. * :: int generic_parse_monolithic(struct fs_context *fc, void *data); Parse a sys_mount() data page, assuming the form to be a text list consisting of key[=val] options separated by commas. Each item in the list is passed to vfs_mount_option(). This is the default when the ->parse_monolithic() method is NULL. * :: int vfs_get_tree(struct fs_context *fc); Get or create the mountable root and superblock, using the parameters in the filesystem context to select/configure the superblock. This invokes the ->get_tree() method. * :: struct vfsmount *vfs_create_mount(struct fs_context *fc); Create a mount given the parameters in the specified filesystem context. Note that this does not attach the mount to anything. ”h]”ji)�”}”(hhh]”(j)�”}”(hXB:: int vfs_parse_fs_param(struct fs_context *fc, struct fs_parameter *param); Supply a single mount parameter to the filesystem context. This includes the specification of the source/device which is specified as the "source" parameter (which may be specified multiple times if the filesystem supports that). param specifies the parameter key name and the value. The parameter is first checked to see if it corresponds to a standard mount flag (in which case it is used to set an SB_xxx flag and consumed) or a security option (in which case the LSM consumes it) before it is passed on to the filesystem. The parameter value is typed and can be one of: ==================== ============================= fs_value_is_flag Parameter not given a value fs_value_is_string Value is a string fs_value_is_blob Value is a binary blob fs_value_is_filename Value is a filename* + dirfd fs_value_is_file Value is an open file (file*) ==================== ============================= If there is a value, that value is stored in a union in the struct in one of param->{string,blob,name,file}. Note that the function may steal and clear the pointer, but then becomes responsible for disposing of the object. ”h]”(jâ)�”}”(hŒaint vfs_parse_fs_param(struct fs_context *fc, struct fs_parameter *param);”h]”hŒaint vfs_parse_fs_param(struct fs_context *fc, struct fs_parameter *param);”…”�”}”hjI sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´MÜhjE ubhý)�”}”(hŒæSupply a single mount parameter to the filesystem context. This includes the specification of the source/device which is specified as the "source" parameter (which may be specified multiple times if the filesystem supports that).”h]”hŒêSupply a single mount parameter to the filesystem context. This includes the specification of the source/device which is specified as the “sourceâ€� parameter (which may be specified multiple times if the filesystem supports that).”…”�”}”(hjW h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MßhjE ubhý)�”}”(hX(param specifies the parameter key name and the value. The parameter is first checked to see if it corresponds to a standard mount flag (in which case it is used to set an SB_xxx flag and consumed) or a security option (in which case the LSM consumes it) before it is passed on to the filesystem.”h]”hX(param specifies the parameter key name and the value. The parameter is first checked to see if it corresponds to a standard mount flag (in which case it is used to set an SB_xxx flag and consumed) or a security option (in which case the LSM consumes it) before it is passed on to the filesystem.”…”�”}”(hje h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MähjE ubhý)�”}”(hŒ/The parameter value is typed and can be one of:”h]”hŒ/The parameter value is typed and can be one of:”…”�”}”(hjs h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MêhjE ubj )�”}”(hXœ==================== ============================= fs_value_is_flag Parameter not given a value fs_value_is_string Value is a string fs_value_is_blob Value is a binary blob fs_value_is_filename Value is a filename* + dirfd fs_value_is_file Value is an open file (file*) ==================== ============================= ”h]”jZ)�”}”(hhh]”j_)�”}”(hhh]”(jd)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1jchjˆ ubjd)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1jchjˆ ubjz)�”}”(hhh]”(j)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒfs_value_is_flag”h]”hŒfs_value_is_flag”…”�”}”(hj¨ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Míhj¥ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhj¢ ubj„)�”}”(hhh]”hý)�”}”(hŒParameter not given a value”h]”hŒParameter not given a value”…”�”}”(hj¿ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Míhj¼ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhj¢ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hjŸ ubj)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒfs_value_is_string”h]”hŒfs_value_is_string”…”�”}”(hjß h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MîhjÜ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjÙ ubj„)�”}”(hhh]”hý)�”}”(hŒValue is a string”h]”hŒValue is a string”…”�”}”(hjö h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mîhjó ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjÙ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hjŸ ubj)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒfs_value_is_blob”h]”hŒfs_value_is_blob”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mïhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhj ubj„)�”}”(hhh]”hý)�”}”(hŒValue is a binary blob”h]”hŒValue is a binary blob”…”�”}”(hj- h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mïhj* ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hjŸ ubj)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒfs_value_is_filename”h]”hŒfs_value_is_filename”…”�”}”(hjM h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MðhjJ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjG ubj„)�”}”(hhh]”hý)�”}”(hŒValue is a filename* + dirfd”h]”hŒValue is a filename* + dirfd”…”�”}”(hjd h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mðhja ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjG ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hjŸ ubj)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒfs_value_is_file”h]”hŒfs_value_is_file”…”�”}”(hj„ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mñhj� ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhj~ ubj„)�”}”(hhh]”hý)�”}”(hŒValue is an open file (file*)”h]”hŒValue is an open file (file*)”…”�”}”(hj› h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mñhj˜ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhj~ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hjŸ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jyhjˆ ubeh}”(h]”h ]”h"]”h$]”h&]”Œcols”Kuh1j^hj… ubah}”(h]”h ]”h"]”h$]”h&]”uh1jYhj� ubah}”(h]”h ]”h"]”h$]”h&]”uh1j h³hÇh´MìhjE ubhý)�”}”(hŒßIf there is a value, that value is stored in a union in the struct in one of param->{string,blob,name,file}. Note that the function may steal and clear the pointer, but then becomes responsible for disposing of the object.”h]”hŒßIf there is a value, that value is stored in a union in the struct in one of param->{string,blob,name,file}. Note that the function may steal and clear the pointer, but then becomes responsible for disposing of the object.”…”�”}”(hjÎ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MôhjE ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjB ubj)�”}”(hŒË:: int vfs_parse_fs_qstr(struct fs_context *fc, const char *key, const struct qstr *value); A wrapper around vfs_parse_fs_param() that copies the value string it is passed. ”h]”(jâ)�”}”(hŒpint vfs_parse_fs_qstr(struct fs_context *fc, const char *key, const struct qstr *value);”h]”hŒpint vfs_parse_fs_qstr(struct fs_context *fc, const char *key, const struct qstr *value);”…”�”}”hjæ sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´Mûhjâ ubhý)�”}”(hŒPA wrapper around vfs_parse_fs_param() that copies the value string it is passed.”h]”hŒPA wrapper around vfs_parse_fs_param() that copies the value string it is passed.”…”�”}”(hjô h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mþhjâ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjB ubj)�”}”(hŒÆ:: int vfs_parse_fs_string(struct fs_context *fc, const char *key, const char *value); A wrapper around vfs_parse_fs_param() that copies the value string it is passed. ”h]”(jâ)�”}”(hŒkint vfs_parse_fs_string(struct fs_context *fc, const char *key, const char *value);”h]”hŒkint vfs_parse_fs_string(struct fs_context *fc, const char *key, const char *value);”…”�”}”hj sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´Mhj ubhý)�”}”(hŒPA wrapper around vfs_parse_fs_param() that copies the value string it is passed.”h]”hŒPA wrapper around vfs_parse_fs_param() that copies the value string it is passed.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mhj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjB ubj)�”}”(hX;:: int generic_parse_monolithic(struct fs_context *fc, void *data); Parse a sys_mount() data page, assuming the form to be a text list consisting of key[=val] options separated by commas. Each item in the list is passed to vfs_mount_option(). This is the default when the ->parse_monolithic() method is NULL. ”h]”(jâ)�”}”(hŒ@int generic_parse_monolithic(struct fs_context *fc, void *data);”h]”hŒ@int generic_parse_monolithic(struct fs_context *fc, void *data);”…”�”}”hj2 sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´M hj. ubhý)�”}”(hŒòParse a sys_mount() data page, assuming the form to be a text list consisting of key[=val] options separated by commas. Each item in the list is passed to vfs_mount_option(). This is the default when the ->parse_monolithic() method is NULL.”h]”hŒòParse a sys_mount() data page, assuming the form to be a text list consisting of key[=val] options separated by commas. Each item in the list is passed to vfs_mount_option(). This is the default when the ->parse_monolithic() method is NULL.”…”�”}”(hj@ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M hj. ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjB ubj)�”}”(hŒÛ:: int vfs_get_tree(struct fs_context *fc); Get or create the mountable root and superblock, using the parameters in the filesystem context to select/configure the superblock. This invokes the ->get_tree() method. ”h]”(jâ)�”}”(hŒ(int vfs_get_tree(struct fs_context *fc);”h]”hŒ(int vfs_get_tree(struct fs_context *fc);”…”�”}”hjX sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´MhjT ubhý)�”}”(hŒªGet or create the mountable root and superblock, using the parameters in the filesystem context to select/configure the superblock. This invokes the ->get_tree() method.”h]”hŒªGet or create the mountable root and superblock, using the parameters in the filesystem context to select/configure the superblock. This invokes the ->get_tree() method.”…”�”}”(hjf h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MhjT ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjB ubj)�”}”(hŒÁ:: struct vfsmount *vfs_create_mount(struct fs_context *fc); Create a mount given the parameters in the specified filesystem context. Note that this does not attach the mount to anything. ”h]”(jâ)�”}”(hŒ9struct vfsmount *vfs_create_mount(struct fs_context *fc);”h]”hŒ9struct vfsmount *vfs_create_mount(struct fs_context *fc);”…”�”}”hj~ sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´Mhjz ubhý)�”}”(hŒ~Create a mount given the parameters in the specified filesystem context. Note that this does not attach the mount to anything.”h]”hŒ~Create a mount given the parameters in the specified filesystem context. Note that this does not attach the mount to anything.”…”�”}”(hjŒ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mhjz ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjB ubeh}”(h]”h ]”h"]”h$]”h&]”jLjMuh1jhh³hÇh´MÚhj> ubah}”(h]”h ]”h"]”h$]”h&]”uh1j h³hÇh´MÚhjðh²hubeh}”(h]”Œvfs-filesystem-context-api”ah ]”h"]”Œvfs filesystem context api”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´MŽubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒSuperblock Creation Helpers”h]”hŒSuperblock Creation Helpers”…”�”}”(hj· h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj´ h²hh³hÇh´M#ubhý)�”}”(hŒkA number of VFS helpers are available for use by filesystems for the creation or looking up of superblocks.”h]”hŒkA number of VFS helpers are available for use by filesystems for the creation or looking up of superblocks.”…”�”}”(hjÅ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M%hj´ h²hubj )�”}”(hX�* :: struct super_block * sget_fc(struct fs_context *fc, int (*test)(struct super_block *sb, struct fs_context *fc), int (*set)(struct super_block *sb, struct fs_context *fc)); This is the core routine. If test is non-NULL, it searches for an existing superblock matching the criteria held in the fs_context, using the test function to match them. If no match is found, a new superblock is created and the set function is called to set it up. Prior to the set function being called, fc->s_fs_info will be transferred to sb->s_fs_info - and fc->s_fs_info will be cleared if set returns success (ie. 0). ”h]”ji)�”}”(hhh]”j)�”}”(hXu:: struct super_block * sget_fc(struct fs_context *fc, int (*test)(struct super_block *sb, struct fs_context *fc), int (*set)(struct super_block *sb, struct fs_context *fc)); This is the core routine. If test is non-NULL, it searches for an existing superblock matching the criteria held in the fs_context, using the test function to match them. If no match is found, a new superblock is created and the set function is called to set it up. Prior to the set function being called, fc->s_fs_info will be transferred to sb->s_fs_info - and fc->s_fs_info will be cleared if set returns success (ie. 0). ”h]”(jâ)�”}”(hŒ»struct super_block * sget_fc(struct fs_context *fc, int (*test)(struct super_block *sb, struct fs_context *fc), int (*set)(struct super_block *sb, struct fs_context *fc));”h]”hŒ»struct super_block * sget_fc(struct fs_context *fc, int (*test)(struct super_block *sb, struct fs_context *fc), int (*set)(struct super_block *sb, struct fs_context *fc));”…”�”}”hjÞ sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´M*hjÚ ubhý)�”}”(hX This is the core routine. If test is non-NULL, it searches for an existing superblock matching the criteria held in the fs_context, using the test function to match them. If no match is found, a new superblock is created and the set function is called to set it up.”h]”hX This is the core routine. If test is non-NULL, it searches for an existing superblock matching the criteria held in the fs_context, using the test function to match them. If no match is found, a new superblock is created and the set function is called to set it up.”…”�”}”(hjì h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M/hjÚ ubhý)�”}”(hŒžPrior to the set function being called, fc->s_fs_info will be transferred to sb->s_fs_info - and fc->s_fs_info will be cleared if set returns success (ie. 0).”h]”hŒžPrior to the set function being called, fc->s_fs_info will be transferred to sb->s_fs_info - and fc->s_fs_info will be cleared if set returns success (ie. 0).”…”�”}”(hjú h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M4hjÚ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj× ubah}”(h]”h ]”h"]”h$]”h&]”jLjMuh1jhh³hÇh´M(hjÓ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j h³hÇh´M(hj´ h²hubhý)�”}”(hŒ)The following helpers all wrap sget_fc():”h]”hŒ)The following helpers all wrap sget_fc():”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M8hj´ h²hubj )�”}”(hX(1) vfs_get_single_super Only one such superblock may exist in the system. Any further attempt to get a new superblock gets this one (and any parameter differences are ignored). (2) vfs_get_keyed_super Multiple superblocks of this type may exist and they're keyed on their s_fs_info pointer (for example this may refer to a namespace). (3) vfs_get_independent_super Multiple independent superblocks of this type may exist. This function never matches an existing one and always creates a new one. ”h]”j)�”}”(hhh]”(j)�”}”(hŒ°vfs_get_single_super Only one such superblock may exist in the system. Any further attempt to get a new superblock gets this one (and any parameter differences are ignored). ”h]”(hý)�”}”(hŒvfs_get_single_super”h]”hŒvfs_get_single_super”…”�”}”(hj3 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M:hj/ ubhý)�”}”(hŒ™Only one such superblock may exist in the system. Any further attempt to get a new superblock gets this one (and any parameter differences are ignored).”h]”hŒ™Only one such superblock may exist in the system. Any further attempt to get a new superblock gets this one (and any parameter differences are ignored).”…”�”}”(hjA h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M<hj/ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj, ubj)�”}”(hŒ›vfs_get_keyed_super Multiple superblocks of this type may exist and they're keyed on their s_fs_info pointer (for example this may refer to a namespace). ”h]”(hý)�”}”(hŒvfs_get_keyed_super”h]”hŒvfs_get_keyed_super”…”�”}”(hjY h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M@hjU ubhý)�”}”(hŒ…Multiple superblocks of this type may exist and they're keyed on their s_fs_info pointer (for example this may refer to a namespace).”h]”hŒ‡Multiple superblocks of this type may exist and they’re keyed on their s_fs_info pointer (for example this may refer to a namespace).”…”�”}”(hjg h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MBhjU ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj, ubj)�”}”(hŒ vfs_get_independent_super Multiple independent superblocks of this type may exist. This function never matches an existing one and always creates a new one. ”h]”(hý)�”}”(hŒvfs_get_independent_super”h]”hŒvfs_get_independent_super”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MFhj{ ubhý)�”}”(hŒƒMultiple independent superblocks of this type may exist. This function never matches an existing one and always creates a new one.”h]”hŒƒMultiple independent superblocks of this type may exist. This function never matches an existing one and always creates a new one.”…”�”}”(hj� h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MHhj{ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj, ubeh}”(h]”h ]”h"]”h$]”h&]”jÇjÈjÉjÊjËjÌuh1jhj( ubah}”(h]”h ]”h"]”h$]”h&]”uh1j h³hÇh´M:hj´ h²hubeh}”(h]”Œsuperblock-creation-helpers”ah ]”h"]”Œsuperblock creation helpers”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´M#ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒParameter Description”h]”hŒParameter Description”…”�”}”(hj¸ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjµ h²hh³hÇh´MNubhý)�”}”(hŒŠParameters are described using structures defined in linux/fs_parser.h. There's a core description struct that links everything together::”h]”hŒ‹Parameters are described using structures defined in linux/fs_parser.h. There’s a core description struct that links everything together:”…”�”}”(hjÆ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MPhjµ h²hubjâ)�”}”(hŒ‚struct fs_parameter_description { const struct fs_parameter_spec *specs; const struct fs_parameter_enum *enums; };”h]”hŒ‚struct fs_parameter_description { const struct fs_parameter_spec *specs; const struct fs_parameter_enum *enums; };”…”�”}”hjÔ sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´MShjµ h²hubhý)�”}”(hŒ For example::”h]”hŒ For example:”…”�”}”(hjâ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MXhjµ h²hubjâ)�”}”(hXenum { Opt_autocell, Opt_bar, Opt_dyn, Opt_foo, Opt_source, }; static const struct fs_parameter_description afs_fs_parameters = { .specs = afs_param_specs, .enums = afs_param_enums, };”h]”hXenum { Opt_autocell, Opt_bar, Opt_dyn, Opt_foo, Opt_source, }; static const struct fs_parameter_description afs_fs_parameters = { .specs = afs_param_specs, .enums = afs_param_enums, };”…”�”}”hjð sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´MZhjµ h²hubhý)�”}”(hŒThe members are as follows:”h]”hŒThe members are as follows:”…”�”}”(hjþ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mghjµ h²hubj )�”}”(hXl(1) :: const struct fs_parameter_specification *specs; Table of parameter specifications, terminated with a null entry, where the entries are of type:: struct fs_parameter_spec { const char *name; u8 opt; enum fs_parameter_type type:8; unsigned short flags; }; The 'name' field is a string to match exactly to the parameter key (no wildcards, patterns and no case-independence) and 'opt' is the value that will be returned by the fs_parser() function in the case of a successful match. The 'type' field indicates the desired value type and must be one of: ======================= ======================= ===================== TYPE NAME EXPECTED VALUE RESULT IN ======================= ======================= ===================== fs_param_is_flag No value n/a fs_param_is_bool Boolean value result->boolean fs_param_is_u32 32-bit unsigned int result->uint_32 fs_param_is_u32_octal 32-bit octal int result->uint_32 fs_param_is_u32_hex 32-bit hex int result->uint_32 fs_param_is_s32 32-bit signed int result->int_32 fs_param_is_u64 64-bit unsigned int result->uint_64 fs_param_is_enum Enum value name result->uint_32 fs_param_is_string Arbitrary string param->string fs_param_is_blockdev Blockdev path * Needs lookup fs_param_is_fd File descriptor result->int_32 fs_param_is_uid User ID (u32) result->uid fs_param_is_gid Group ID (u32) result->gid ======================= ======================= ===================== Note that if the value is of fs_param_is_bool type, fs_parse() will try to match any string value against "0", "1", "no", "yes", "false", "true". Each parameter can also be qualified with 'flags': ======================= ================================================ fs_param_v_optional The value is optional fs_param_neg_with_no result->negated set if key is prefixed with "no" fs_param_neg_with_empty result->negated set if value is "" fs_param_deprecated The parameter is deprecated. ======================= ================================================ These are wrapped with a number of convenience wrappers: ======================= =============================================== MACRO SPECIFIES ======================= =============================================== fsparam_flag() fs_param_is_flag fsparam_flag_no() fs_param_is_flag, fs_param_neg_with_no fsparam_bool() fs_param_is_bool fsparam_u32() fs_param_is_u32 fsparam_u32oct() fs_param_is_u32_octal fsparam_s32() fs_param_is_s32 fsparam_u64() fs_param_is_u64 fsparam_enum() fs_param_is_enum fsparam_string() fs_param_is_string fsparam_bdev() fs_param_is_blockdev fsparam_fd() fs_param_is_fd fsparam_uid() fs_param_is_uid fsparam_gid() fs_param_is_gid ======================= =============================================== all of which take two arguments, name string and option number - for example:: static const struct fs_parameter_spec afs_param_specs[] = { fsparam_flag ("autocell", Opt_autocell), fsparam_flag ("dyn", Opt_dyn), fsparam_string ("source", Opt_source), fsparam_flag_no ("foo", Opt_foo), {} }; An addition macro, __fsparam() is provided that takes an additional pair of arguments to specify the type and the flags for anything that doesn't match one of the above macros. (2) :: const struct fs_parameter_enum *enums; Table of enum value names to integer mappings, terminated with a null entry. This is of type:: struct fs_parameter_enum { u8 opt; char name[14]; u8 value; }; Where the array is an unsorted list of { parameter ID, name }-keyed elements that indicate the value to map to, e.g.:: static const struct fs_parameter_enum afs_param_enums[] = { { Opt_bar, "x", 1}, { Opt_bar, "y", 23}, { Opt_bar, "z", 42}, }; If a parameter of type fs_param_is_enum is encountered, fs_parse() will try to look the value up in the enum table and the result will be stored in the parse result. ”h]”j)�”}”(hhh]”(j)�”}”(hX:: const struct fs_parameter_specification *specs; Table of parameter specifications, terminated with a null entry, where the entries are of type:: struct fs_parameter_spec { const char *name; u8 opt; enum fs_parameter_type type:8; unsigned short flags; }; The 'name' field is a string to match exactly to the parameter key (no wildcards, patterns and no case-independence) and 'opt' is the value that will be returned by the fs_parser() function in the case of a successful match. The 'type' field indicates the desired value type and must be one of: ======================= ======================= ===================== TYPE NAME EXPECTED VALUE RESULT IN ======================= ======================= ===================== fs_param_is_flag No value n/a fs_param_is_bool Boolean value result->boolean fs_param_is_u32 32-bit unsigned int result->uint_32 fs_param_is_u32_octal 32-bit octal int result->uint_32 fs_param_is_u32_hex 32-bit hex int result->uint_32 fs_param_is_s32 32-bit signed int result->int_32 fs_param_is_u64 64-bit unsigned int result->uint_64 fs_param_is_enum Enum value name result->uint_32 fs_param_is_string Arbitrary string param->string fs_param_is_blockdev Blockdev path * Needs lookup fs_param_is_fd File descriptor result->int_32 fs_param_is_uid User ID (u32) result->uid fs_param_is_gid Group ID (u32) result->gid ======================= ======================= ===================== Note that if the value is of fs_param_is_bool type, fs_parse() will try to match any string value against "0", "1", "no", "yes", "false", "true". Each parameter can also be qualified with 'flags': ======================= ================================================ fs_param_v_optional The value is optional fs_param_neg_with_no result->negated set if key is prefixed with "no" fs_param_neg_with_empty result->negated set if value is "" fs_param_deprecated The parameter is deprecated. ======================= ================================================ These are wrapped with a number of convenience wrappers: ======================= =============================================== MACRO SPECIFIES ======================= =============================================== fsparam_flag() fs_param_is_flag fsparam_flag_no() fs_param_is_flag, fs_param_neg_with_no fsparam_bool() fs_param_is_bool fsparam_u32() fs_param_is_u32 fsparam_u32oct() fs_param_is_u32_octal fsparam_s32() fs_param_is_s32 fsparam_u64() fs_param_is_u64 fsparam_enum() fs_param_is_enum fsparam_string() fs_param_is_string fsparam_bdev() fs_param_is_blockdev fsparam_fd() fs_param_is_fd fsparam_uid() fs_param_is_uid fsparam_gid() fs_param_is_gid ======================= =============================================== all of which take two arguments, name string and option number - for example:: static const struct fs_parameter_spec afs_param_specs[] = { fsparam_flag ("autocell", Opt_autocell), fsparam_flag ("dyn", Opt_dyn), fsparam_string ("source", Opt_source), fsparam_flag_no ("foo", Opt_foo), {} }; An addition macro, __fsparam() is provided that takes an additional pair of arguments to specify the type and the flags for anything that doesn't match one of the above macros. ”h]”(jâ)�”}”(hŒ/const struct fs_parameter_specification *specs;”h]”hŒ/const struct fs_parameter_specification *specs;”…”�”}”hjsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´Mkhjubhý)�”}”(hŒ`Table of parameter specifications, terminated with a null entry, where the entries are of type::”h]”hŒ_Table of parameter specifications, terminated with a null entry, where the entries are of type:”…”�”}”(hj%h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mmhjubjâ)�”}”(hŒ¸struct fs_parameter_spec { const char *name; u8 opt; enum fs_parameter_type type:8; unsigned short flags; };”h]”hŒ¸struct fs_parameter_spec { const char *name; u8 opt; enum fs_parameter_type type:8; unsigned short flags; };”…”�”}”hj3sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´Mphjubhý)�”}”(hŒàThe 'name' field is a string to match exactly to the parameter key (no wildcards, patterns and no case-independence) and 'opt' is the value that will be returned by the fs_parser() function in the case of a successful match.”h]”hŒèThe ‘name’ field is a string to match exactly to the parameter key (no wildcards, patterns and no case-independence) and ‘opt’ is the value that will be returned by the fs_parser() function in the case of a successful match.”…”�”}”(hjAh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mwhjubhý)�”}”(hŒEThe 'type' field indicates the desired value type and must be one of:”h]”hŒIThe ‘type’ field indicates the desired value type and must be one of:”…”�”}”(hjOh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M|hjubj )�”}”(hX3======================= ======================= ===================== TYPE NAME EXPECTED VALUE RESULT IN ======================= ======================= ===================== fs_param_is_flag No value n/a fs_param_is_bool Boolean value result->boolean fs_param_is_u32 32-bit unsigned int result->uint_32 fs_param_is_u32_octal 32-bit octal int result->uint_32 fs_param_is_u32_hex 32-bit hex int result->uint_32 fs_param_is_s32 32-bit signed int result->int_32 fs_param_is_u64 64-bit unsigned int result->uint_64 fs_param_is_enum Enum value name result->uint_32 fs_param_is_string Arbitrary string param->string fs_param_is_blockdev Blockdev path * Needs lookup fs_param_is_fd File descriptor result->int_32 fs_param_is_uid User ID (u32) result->uid fs_param_is_gid Group ID (u32) result->gid ======================= ======================= ===================== ”h]”jZ)�”}”(hhh]”j_)�”}”(hhh]”(jd)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1jchjdubjd)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1jchjdubjd)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1jchjdubhŒthead”“”)�”}”(hhh]”j)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒ TYPE NAME”h]”hŒ TYPE NAME”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mhj�ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjŠubj„)�”}”(hhh]”hý)�”}”(hŒEXPECTED VALUE”h]”hŒEXPECTED VALUE”…”�”}”(hj§h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mhj¤ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjŠubj„)�”}”(hhh]”hý)�”}”(hŒ RESULT IN”h]”hŒ RESULT IN”…”�”}”(hj¾h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mhj»ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjŠubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hj‡ubah}”(h]”h ]”h"]”h$]”h&]”uh1j…hjdubjz)�”}”(hhh]”(j)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒfs_param_is_flag”h]”hŒfs_param_is_flag”…”�”}”(hjçh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M�hjäubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjáubj„)�”}”(hhh]”hý)�”}”(hŒNo value”h]”hŒNo value”…”�”}”(hjþh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M�hjûubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjáubj„)�”}”(hhh]”hý)�”}”(hŒn/a”h]”hŒn/a”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M�hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjáubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hjÞubj)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒfs_param_is_bool”h]”hŒfs_param_is_bool”…”�”}”(hj5h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M‚hj2ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhj/ubj„)�”}”(hhh]”hý)�”}”(hŒ Boolean value”h]”hŒ Boolean value”…”�”}”(hjLh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M‚hjIubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhj/ubj„)�”}”(hhh]”hý)�”}”(hŒresult->boolean”h]”hŒresult->boolean”…”�”}”(hjch²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M‚hj`ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhj/ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hjÞubj)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒfs_param_is_u32”h]”hŒfs_param_is_u32”…”�”}”(hjƒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mƒhj€ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhj}ubj„)�”}”(hhh]”hý)�”}”(hŒ32-bit unsigned int”h]”hŒ32-bit unsigned int”…”�”}”(hjšh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mƒhj—ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhj}ubj„)�”}”(hhh]”hý)�”}”(hŒresult->uint_32”h]”hŒresult->uint_32”…”�”}”(hj±h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mƒhj®ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhj}ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hjÞubj)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒfs_param_is_u32_octal”h]”hŒfs_param_is_u32_octal”…”�”}”(hjÑh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M„hjÎubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjËubj„)�”}”(hhh]”hý)�”}”(hŒ32-bit octal int”h]”hŒ32-bit octal int”…”�”}”(hjèh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M„hjåubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjËubj„)�”}”(hhh]”hý)�”}”(hŒresult->uint_32”h]”hŒresult->uint_32”…”�”}”(hjÿh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M„hjüubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjËubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hjÞubj)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒfs_param_is_u32_hex”h]”hŒfs_param_is_u32_hex”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M…hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjubj„)�”}”(hhh]”hý)�”}”(hŒ32-bit hex int”h]”hŒ32-bit hex int”…”�”}”(hj6h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M…hj3ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjubj„)�”}”(hhh]”hý)�”}”(hŒresult->uint_32”h]”hŒresult->uint_32”…”�”}”(hjMh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M…hjJubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hjÞubj)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒfs_param_is_s32”h]”hŒfs_param_is_s32”…”�”}”(hjmh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M†hjjubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjgubj„)�”}”(hhh]”hý)�”}”(hŒ32-bit signed int”h]”hŒ32-bit signed int”…”�”}”(hj„h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M†hj�ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjgubj„)�”}”(hhh]”hý)�”}”(hŒresult->int_32”h]”hŒresult->int_32”…”�”}”(hj›h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M†hj˜ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjgubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hjÞubj)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒfs_param_is_u64”h]”hŒfs_param_is_u64”…”�”}”(hj»h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M‡hj¸ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjµubj„)�”}”(hhh]”hý)�”}”(hŒ64-bit unsigned int”h]”hŒ64-bit unsigned int”…”�”}”(hjÒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M‡hjÏubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjµubj„)�”}”(hhh]”hý)�”}”(hŒresult->uint_64”h]”hŒresult->uint_64”…”�”}”(hjéh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M‡hjæubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjµubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hjÞubj)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒfs_param_is_enum”h]”hŒfs_param_is_enum”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mˆhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjubj„)�”}”(hhh]”hý)�”}”(hŒEnum value name”h]”hŒEnum value name”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mˆhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjubj„)�”}”(hhh]”hý)�”}”(hŒresult->uint_32”h]”hŒresult->uint_32”…”�”}”(hj7h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mˆhj4ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hjÞubj)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒfs_param_is_string”h]”hŒfs_param_is_string”…”�”}”(hjWh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M‰hjTubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjQubj„)�”}”(hhh]”hý)�”}”(hŒArbitrary string”h]”hŒArbitrary string”…”�”}”(hjnh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M‰hjkubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjQubj„)�”}”(hhh]”hý)�”}”(hŒ param->string”h]”hŒ param->string”…”�”}”(hj…h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M‰hj‚ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjQubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hjÞubj)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒfs_param_is_blockdev”h]”hŒfs_param_is_blockdev”…”�”}”(hj¥h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MŠhj¢ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjŸubj„)�”}”(hhh]”hý)�”}”(hŒ Blockdev path”h]”hŒ Blockdev path”…”�”}”(hj¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MŠhj¹ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjŸubj„)�”}”(hhh]”ji)�”}”(hhh]”j)�”}”(hŒ Needs lookup”h]”hý)�”}”(hjØh]”hŒ Needs lookup”…”�”}”(hjÚh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MŠhjÖubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjÓubah}”(h]”h ]”h"]”h$]”h&]”jLjMuh1jhh³hÇh´MŠhjÐubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjŸubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hjÞubj)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒfs_param_is_fd”h]”hŒfs_param_is_fd”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M‹hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjÿubj„)�”}”(hhh]”hý)�”}”(hŒFile descriptor”h]”hŒFile descriptor”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M‹hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjÿubj„)�”}”(hhh]”hý)�”}”(hŒresult->int_32”h]”hŒresult->int_32”…”�”}”(hj3h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M‹hj0ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjÿubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hjÞubj)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒfs_param_is_uid”h]”hŒfs_param_is_uid”…”�”}”(hjSh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MŒhjPubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjMubj„)�”}”(hhh]”hý)�”}”(hŒ User ID (u32)”h]”hŒ User ID (u32)”…”�”}”(hjjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MŒhjgubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjMubj„)�”}”(hhh]”hý)�”}”(hŒ result->uid”h]”hŒ result->uid”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MŒhj~ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjMubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hjÞubj)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒfs_param_is_gid”h]”hŒfs_param_is_gid”…”�”}”(hj¡h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M�hjžubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhj›ubj„)�”}”(hhh]”hý)�”}”(hŒGroup ID (u32)”h]”hŒGroup ID (u32)”…”�”}”(hj¸h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M�hjµubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhj›ubj„)�”}”(hhh]”hý)�”}”(hŒ result->gid”h]”hŒ result->gid”…”�”}”(hjÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M�hjÌubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhj›ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hjÞubeh}”(h]”h ]”h"]”h$]”h&]”uh1jyhjdubeh}”(h]”h ]”h"]”h$]”h&]”Œcols”Kuh1j^hjaubah}”(h]”h ]”h"]”h$]”h&]”uh1jYhj]ubah}”(h]”h ]”h"]”h$]”h&]”uh1j h³hÇh´M~hjubhý)�”}”(hŒ‘Note that if the value is of fs_param_is_bool type, fs_parse() will try to match any string value against "0", "1", "no", "yes", "false", "true".”h]”hŒ©Note that if the value is of fs_param_is_bool type, fs_parse() will try to match any string value against “0â€�, “1â€�, “noâ€�, “yesâ€�, “falseâ€�, “trueâ€�.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M�hjubhý)�”}”(hŒ2Each parameter can also be qualified with 'flags':”h]”hŒ6Each parameter can also be qualified with ‘flags’:”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M“hjubj )�”}”(hXy======================= ================================================ fs_param_v_optional The value is optional fs_param_neg_with_no result->negated set if key is prefixed with "no" fs_param_neg_with_empty result->negated set if value is "" fs_param_deprecated The parameter is deprecated. ======================= ================================================ ”h]”jZ)�”}”(hhh]”j_)�”}”(hhh]”(jd)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1jchj%ubjd)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”K0uh1jchj%ubjz)�”}”(hhh]”(j)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒfs_param_v_optional”h]”hŒfs_param_v_optional”…”�”}”(hjEh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M–hjBubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhj?ubj„)�”}”(hhh]”hý)�”}”(hŒThe value is optional”h]”hŒThe value is optional”…”�”}”(hj\h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M–hjYubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhj?ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hj<ubj)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒfs_param_neg_with_no”h]”hŒfs_param_neg_with_no”…”�”}”(hj|h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M—hjyubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjvubj„)�”}”(hhh]”hý)�”}”(hŒ0result->negated set if key is prefixed with "no"”h]”hŒ4result->negated set if key is prefixed with “noâ€�”…”�”}”(hj“h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M—hj�ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjvubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hj<ubj)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒfs_param_neg_with_empty”h]”hŒfs_param_neg_with_empty”…”�”}”(hj³h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M˜hj°ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhj­ubj„)�”}”(hhh]”hý)�”}”(hŒ"result->negated set if value is ""”h]”hŒ&result->negated set if value is “â€�”…”�”}”(hjÊh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M˜hjÇubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhj­ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hj<ubj)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒfs_param_deprecated”h]”hŒfs_param_deprecated”…”�”}”(hjêh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M™hjçubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjäubj„)�”}”(hhh]”hý)�”}”(hŒThe parameter is deprecated.”h]”hŒThe parameter is deprecated.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M™hjþubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjäubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hj<ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jyhj%ubeh}”(h]”h ]”h"]”h$]”h&]”Œcols”Kuh1j^hj"ubah}”(h]”h ]”h"]”h$]”h&]”uh1jYhjubah}”(h]”h ]”h"]”h$]”h&]”uh1j h³hÇh´M•hjubhý)�”}”(hŒ8These are wrapped with a number of convenience wrappers:”h]”hŒ8These are wrapped with a number of convenience wrappers:”…”�”}”(hj4h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mœhjubj )�”}”(hX)======================= =============================================== MACRO SPECIFIES ======================= =============================================== fsparam_flag() fs_param_is_flag fsparam_flag_no() fs_param_is_flag, fs_param_neg_with_no fsparam_bool() fs_param_is_bool fsparam_u32() fs_param_is_u32 fsparam_u32oct() fs_param_is_u32_octal fsparam_s32() fs_param_is_s32 fsparam_u64() fs_param_is_u64 fsparam_enum() fs_param_is_enum fsparam_string() fs_param_is_string fsparam_bdev() fs_param_is_blockdev fsparam_fd() fs_param_is_fd fsparam_uid() fs_param_is_uid fsparam_gid() fs_param_is_gid ======================= =============================================== ”h]”jZ)�”}”(hhh]”j_)�”}”(hhh]”(jd)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1jchjIubjd)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”K/uh1jchjIubj†)�”}”(hhh]”j)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒMACRO”h]”hŒMACRO”…”�”}”(hjih²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MŸhjfubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjcubj„)�”}”(hhh]”hý)�”}”(hŒ SPECIFIES”h]”hŒ SPECIFIES”…”�”}”(hj€h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MŸhj}ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjcubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hj`ubah}”(h]”h ]”h"]”h$]”h&]”uh1j…hjIubjz)�”}”(hhh]”(j)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒfsparam_flag()”h]”hŒfsparam_flag()”…”�”}”(hj©h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M¡hj¦ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhj£ubj„)�”}”(hhh]”hý)�”}”(hŒfs_param_is_flag”h]”hŒfs_param_is_flag”…”�”}”(hjÀh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M¡hj½ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhj£ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hj ubj)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒfsparam_flag_no()”h]”hŒfsparam_flag_no()”…”�”}”(hjàh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M¢hjÝubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjÚubj„)�”}”(hhh]”hý)�”}”(hŒ&fs_param_is_flag, fs_param_neg_with_no”h]”hŒ&fs_param_is_flag, fs_param_neg_with_no”…”�”}”(hj÷h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M¢hjôubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjÚubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hj ubj)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒfsparam_bool()”h]”hŒfsparam_bool()”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M£hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjubj„)�”}”(hhh]”hý)�”}”(hŒfs_param_is_bool”h]”hŒfs_param_is_bool”…”�”}”(hj.h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M£hj+ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hj ubj)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒ fsparam_u32()”h]”hŒ fsparam_u32()”…”�”}”(hjNh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M¤hjKubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjHubj„)�”}”(hhh]”hý)�”}”(hŒfs_param_is_u32”h]”hŒfs_param_is_u32”…”�”}”(hjeh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M¤hjbubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjHubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hj ubj)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒfsparam_u32oct()”h]”hŒfsparam_u32oct()”…”�”}”(hj…h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M¥hj‚ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjubj„)�”}”(hhh]”hý)�”}”(hŒfs_param_is_u32_octal”h]”hŒfs_param_is_u32_octal”…”�”}”(hjœh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M¥hj™ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hj ubj)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒ fsparam_s32()”h]”hŒ fsparam_s32()”…”�”}”(hj¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M¦hj¹ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhj¶ubj„)�”}”(hhh]”hý)�”}”(hŒfs_param_is_s32”h]”hŒfs_param_is_s32”…”�”}”(hjÓh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M¦hjÐubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhj¶ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hj ubj)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒ fsparam_u64()”h]”hŒ fsparam_u64()”…”�”}”(hjóh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M§hjðubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjíubj„)�”}”(hhh]”hý)�”}”(hŒfs_param_is_u64”h]”hŒfs_param_is_u64”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M§hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjíubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hj ubj)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒfsparam_enum()”h]”hŒfsparam_enum()”…”�”}”(hj*h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M¨hj'ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhj$ubj„)�”}”(hhh]”hý)�”}”(hŒfs_param_is_enum”h]”hŒfs_param_is_enum”…”�”}”(hjAh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M¨hj>ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhj$ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hj ubj)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒfsparam_string()”h]”hŒfsparam_string()”…”�”}”(hjah²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M©hj^ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhj[ubj„)�”}”(hhh]”hý)�”}”(hŒfs_param_is_string”h]”hŒfs_param_is_string”…”�”}”(hjxh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M©hjuubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhj[ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hj ubj)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒfsparam_bdev()”h]”hŒfsparam_bdev()”…”�”}”(hj˜h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mªhj•ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhj’ubj„)�”}”(hhh]”hý)�”}”(hŒfs_param_is_blockdev”h]”hŒfs_param_is_blockdev”…”�”}”(hj¯h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mªhj¬ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhj’ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hj ubj)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒ fsparam_fd()”h]”hŒ fsparam_fd()”…”�”}”(hjÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M«hjÌubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjÉubj„)�”}”(hhh]”hý)�”}”(hŒfs_param_is_fd”h]”hŒfs_param_is_fd”…”�”}”(hjæh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M«hjãubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjÉubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hj ubj)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒ fsparam_uid()”h]”hŒ fsparam_uid()”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M¬hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjubj„)�”}”(hhh]”hý)�”}”(hŒfs_param_is_uid”h]”hŒfs_param_is_uid”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M¬hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hj ubj)�”}”(hhh]”(j„)�”}”(hhh]”hý)�”}”(hŒ fsparam_gid()”h]”hŒ fsparam_gid()”…”�”}”(hj=h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M­hj:ubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhj7ubj„)�”}”(hhh]”hý)�”}”(hŒfs_param_is_gid”h]”hŒfs_param_is_gid”…”�”}”(hjTh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M­hjQubah}”(h]”h ]”h"]”h$]”h&]”uh1jƒhj7ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j~hj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jyhjIubeh}”(h]”h ]”h"]”h$]”h&]”Œcols”Kuh1j^hjFubah}”(h]”h ]”h"]”h$]”h&]”uh1jYhjBubah}”(h]”h ]”h"]”h$]”h&]”uh1j h³hÇh´Mžhjubhý)�”}”(hŒNall of which take two arguments, name string and option number - for example::”h]”hŒMall of which take two arguments, name string and option number - for example:”…”�”}”(hj‡h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M°hjubjâ)�”}”(hXstatic const struct fs_parameter_spec afs_param_specs[] = { fsparam_flag ("autocell", Opt_autocell), fsparam_flag ("dyn", Opt_dyn), fsparam_string ("source", Opt_source), fsparam_flag_no ("foo", Opt_foo), {} };”h]”hXstatic const struct fs_parameter_spec afs_param_specs[] = { fsparam_flag ("autocell", Opt_autocell), fsparam_flag ("dyn", Opt_dyn), fsparam_string ("source", Opt_source), fsparam_flag_no ("foo", Opt_foo), {} };”…”�”}”hj•sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´M³hjubhý)�”}”(hŒ°An addition macro, __fsparam() is provided that takes an additional pair of arguments to specify the type and the flags for anything that doesn't match one of the above macros.”h]”hŒ²An addition macro, __fsparam() is provided that takes an additional pair of arguments to specify the type and the flags for anything that doesn’t match one of the above macros.”…”�”}”(hj£h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M»hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjubj)�”}”(hXó:: const struct fs_parameter_enum *enums; Table of enum value names to integer mappings, terminated with a null entry. This is of type:: struct fs_parameter_enum { u8 opt; char name[14]; u8 value; }; Where the array is an unsorted list of { parameter ID, name }-keyed elements that indicate the value to map to, e.g.:: static const struct fs_parameter_enum afs_param_enums[] = { { Opt_bar, "x", 1}, { Opt_bar, "y", 23}, { Opt_bar, "z", 42}, }; If a parameter of type fs_param_is_enum is encountered, fs_parse() will try to look the value up in the enum table and the result will be stored in the parse result. ”h]”(jâ)�”}”(hŒ&const struct fs_parameter_enum *enums;”h]”hŒ&const struct fs_parameter_enum *enums;”…”�”}”hj»sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´MÁhj·ubhý)�”}”(hŒ_Table of enum value names to integer mappings, terminated with a null entry. This is of type::”h]”hŒ^Table of enum value names to integer mappings, terminated with a null entry. This is of type:”…”�”}”(hjÉh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MÃhj·ubjâ)�”}”(hŒ{struct fs_parameter_enum { u8 opt; char name[14]; u8 value; };”h]”hŒ{struct fs_parameter_enum { u8 opt; char name[14]; u8 value; };”…”�”}”hj×sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´MÆhj·ubhý)�”}”(hŒvWhere the array is an unsorted list of { parameter ID, name }-keyed elements that indicate the value to map to, e.g.::”h]”hŒuWhere the array is an unsorted list of { parameter ID, name }-keyed elements that indicate the value to map to, e.g.:”…”�”}”(hjåh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MÌhj·ubjâ)�”}”(hŒ©static const struct fs_parameter_enum afs_param_enums[] = { { Opt_bar, "x", 1}, { Opt_bar, "y", 23}, { Opt_bar, "z", 42}, };”h]”hŒ©static const struct fs_parameter_enum afs_param_enums[] = { { Opt_bar, "x", 1}, { Opt_bar, "y", 23}, { Opt_bar, "z", 42}, };”…”�”}”hjósbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´MÏhj·ubhý)�”}”(hŒ¥If a parameter of type fs_param_is_enum is encountered, fs_parse() will try to look the value up in the enum table and the result will be stored in the parse result.”h]”hŒ¥If a parameter of type fs_param_is_enum is encountered, fs_parse() will try to look the value up in the enum table and the result will be stored in the parse result.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MÕhj·ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjubeh}”(h]”h ]”h"]”h$]”h&]”jÇjÈjÉjÊjËjÌuh1jhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1j h³hÇh´Mihjµ h²hubhý)�”}”(hŒýThe parser should be pointed to by the parser pointer in the file_system_type struct as this will provide validation on registration (if CONFIG_VALIDATE_FS_PARSER=y) and will allow the description to be queried from userspace using the fsinfo() syscall.”h]”hŒýThe parser should be pointed to by the parser pointer in the file_system_type struct as this will provide validation on registration (if CONFIG_VALIDATE_FS_PARSER=y) and will allow the description to be queried from userspace using the fsinfo() syscall.”…”�”}”(hj!h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MÙhjµ h²hubeh}”(h]”Œparameter-description”ah ]”h"]”Œparameter description”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´MNubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒParameter Helper Functions”h]”hŒParameter Helper Functions”…”�”}”(hj:h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj7h²hh³hÇh´Màubhý)�”}”(hŒlA number of helper functions are provided to help a filesystem or an LSM process the parameters it is given.”h]”hŒlA number of helper functions are provided to help a filesystem or an LSM process the parameters it is given.”…”�”}”(hjHh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mâhj7h²hubj )�”}”(hX× * :: int lookup_constant(const struct constant_table tbl[], const char *name, int not_found); Look up a constant by name in a table of name -> integer mappings. The table is an array of elements of the following type:: struct constant_table { const char *name; int value; }; If a match is found, the corresponding value is returned. If a match isn't found, the not_found value is returned instead. * :: bool fs_validate_description(const char *name, const struct fs_parameter_description *desc); This performs some validation checks on a parameter description. It returns true if the description is good and false if it is not. It will log errors to the kernel log buffer if validation fails. * :: int fs_parse(struct fs_context *fc, const struct fs_parameter_description *desc, struct fs_parameter *param, struct fs_parse_result *result); This is the main interpreter of parameters. It uses the parameter description to look up a parameter by key name and to convert that to an option number (which it returns). If successful, and if the parameter type indicates the result is a boolean, integer, enum, uid, or gid type, the value is converted by this function and the result stored in result->{boolean,int_32,uint_32,uint_64,uid,gid}. If a match isn't initially made, the key is prefixed with "no" and no value is present then an attempt will be made to look up the key with the prefix removed. If this matches a parameter for which the type has flag fs_param_neg_with_no set, then a match will be made and result->negated will be set to true. If the parameter isn't matched, -ENOPARAM will be returned; if the parameter is matched, but the value is erroneous, -EINVAL will be returned; otherwise the parameter's option number will be returned. * :: int fs_lookup_param(struct fs_context *fc, struct fs_parameter *value, bool want_bdev, unsigned int flags, struct path *_path); This takes a parameter that carries a string or filename type and attempts to do a path lookup on it. If the parameter expects a blockdev, a check is made that the inode actually represents one. Returns 0 if successful and ``*_path`` will be set; returns a negative error code if not.”•Š,h]”ji)�”}”(hhh]”(j)�”}”(hX×:: int lookup_constant(const struct constant_table tbl[], const char *name, int not_found); Look up a constant by name in a table of name -> integer mappings. The table is an array of elements of the following type:: struct constant_table { const char *name; int value; }; If a match is found, the corresponding value is returned. If a match isn't found, the not_found value is returned instead. ”h]”(jâ)�”}”(hŒlint lookup_constant(const struct constant_table tbl[], const char *name, int not_found);”h]”hŒlint lookup_constant(const struct constant_table tbl[], const char *name, int not_found);”…”�”}”hjasbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´Mçhj]ubhý)�”}”(hŒ}Look up a constant by name in a table of name -> integer mappings. The table is an array of elements of the following type::”h]”hŒ|Look up a constant by name in a table of name -> integer mappings. The table is an array of elements of the following type:”…”�”}”(hjoh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mêhj]ubjâ)�”}”(hŒXstruct constant_table { const char *name; int value; };”h]”hŒXstruct constant_table { const char *name; int value; };”…”�”}”hj}sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´Míhj]ubhý)�”}”(hŒ{If a match is found, the corresponding value is returned. If a match isn't found, the not_found value is returned instead.”h]”hŒ}If a match is found, the corresponding value is returned. If a match isn’t found, the not_found value is returned instead.”…”�”}”(hj‹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Mòhj]ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjZubj)�”}”(hXJ:: bool fs_validate_description(const char *name, const struct fs_parameter_description *desc); This performs some validation checks on a parameter description. It returns true if the description is good and false if it is not. It will log errors to the kernel log buffer if validation fails. ”h]”(jâ)�”}”(hŒybool fs_validate_description(const char *name, const struct fs_parameter_description *desc);”h]”hŒybool fs_validate_description(const char *name, const struct fs_parameter_description *desc);”…”�”}”hj£sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´M÷hjŸubhý)�”}”(hŒÆThis performs some validation checks on a parameter description. It returns true if the description is good and false if it is not. It will log errors to the kernel log buffer if validation fails.”h]”hŒÆThis performs some validation checks on a parameter description. It returns true if the description is good and false if it is not. It will log errors to the kernel log buffer if validation fails.”…”�”}”(hj±h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MúhjŸubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjZubj)�”}”(hXV:: int fs_parse(struct fs_context *fc, const struct fs_parameter_description *desc, struct fs_parameter *param, struct fs_parse_result *result); This is the main interpreter of parameters. It uses the parameter description to look up a parameter by key name and to convert that to an option number (which it returns). If successful, and if the parameter type indicates the result is a boolean, integer, enum, uid, or gid type, the value is converted by this function and the result stored in result->{boolean,int_32,uint_32,uint_64,uid,gid}. If a match isn't initially made, the key is prefixed with "no" and no value is present then an attempt will be made to look up the key with the prefix removed. If this matches a parameter for which the type has flag fs_param_neg_with_no set, then a match will be made and result->negated will be set to true. If the parameter isn't matched, -ENOPARAM will be returned; if the parameter is matched, but the value is erroneous, -EINVAL will be returned; otherwise the parameter's option number will be returned. ”h]”(jâ)�”}”(hŒ´int fs_parse(struct fs_context *fc, const struct fs_parameter_description *desc, struct fs_parameter *param, struct fs_parse_result *result);”h]”hŒ´int fs_parse(struct fs_context *fc, const struct fs_parameter_description *desc, struct fs_parameter *param, struct fs_parse_result *result);”…”�”}”hjÉsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´MhjÅubhý)�”}”(hŒ­This is the main interpreter of parameters. It uses the parameter description to look up a parameter by key name and to convert that to an option number (which it returns).”h]”hŒ­This is the main interpreter of parameters. It uses the parameter description to look up a parameter by key name and to convert that to an option number (which it returns).”…”�”}”(hj×h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MhjÅubhý)�”}”(hŒßIf successful, and if the parameter type indicates the result is a boolean, integer, enum, uid, or gid type, the value is converted by this function and the result stored in result->{boolean,int_32,uint_32,uint_64,uid,gid}.”h]”hŒßIf successful, and if the parameter type indicates the result is a boolean, integer, enum, uid, or gid type, the value is converted by this function and the result stored in result->{boolean,int_32,uint_32,uint_64,uid,gid}.”…”�”}”(hjåh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M hjÅubhý)�”}”(hX5If a match isn't initially made, the key is prefixed with "no" and no value is present then an attempt will be made to look up the key with the prefix removed. If this matches a parameter for which the type has flag fs_param_neg_with_no set, then a match will be made and result->negated will be set to true.”h]”hX;If a match isn’t initially made, the key is prefixed with “noâ€� and no value is present then an attempt will be made to look up the key with the prefix removed. If this matches a parameter for which the type has flag fs_param_neg_with_no set, then a match will be made and result->negated will be set to true.”…”�”}”(hjóh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MhjÅubhý)�”}”(hŒÈIf the parameter isn't matched, -ENOPARAM will be returned; if the parameter is matched, but the value is erroneous, -EINVAL will be returned; otherwise the parameter's option number will be returned.”h]”hŒÌIf the parameter isn’t matched, -ENOPARAM will be returned; if the parameter is matched, but the value is erroneous, -EINVAL will be returned; otherwise the parameter’s option number will be returned.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´MhjÅubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjZubj)�”}”(hXý:: int fs_lookup_param(struct fs_context *fc, struct fs_parameter *value, bool want_bdev, unsigned int flags, struct path *_path); This takes a parameter that carries a string or filename type and attempts to do a path lookup on it. If the parameter expects a blockdev, a check is made that the inode actually represents one. Returns 0 if successful and ``*_path`` will be set; returns a negative error code if not.”h]”(jâ)�”}”(hŒÏint fs_lookup_param(struct fs_context *fc, struct fs_parameter *value, bool want_bdev, unsigned int flags, struct path *_path);”h]”hŒÏint fs_lookup_param(struct fs_context *fc, struct fs_parameter *value, bool want_bdev, unsigned int flags, struct path *_path);”…”�”}”hjsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jáh³hÇh´Mhjubhý)�”}”(hŒÃThis takes a parameter that carries a string or filename type and attempts to do a path lookup on it. If the parameter expects a blockdev, a check is made that the inode actually represents one.”h]”hŒÃThis takes a parameter that carries a string or filename type and attempts to do a path lookup on it. If the parameter expects a blockdev, a check is made that the inode actually represents one.”…”�”}”(hj'h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M hjubhý)�”}”(hŒYReturns 0 if successful and ``*_path`` will be set; returns a negative error code if not.”h]”(hŒReturns 0 if successful and ”…”�”}”(hj5h²hh³Nh´NubhŒliteral”“”)�”}”(hŒ ``*_path``”h]”hŒ*_path”…”�”}”(hj?h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j=hj5ubhŒ3 will be set; returns a negative error code if not.”…”�”}”(hj5h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´M$hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjZubeh}”(h]”h ]”h"]”h$]”h&]”jLjMuh1jhh³hÇh´MåhjVubah}”(h]”h ]”h"]”h$]”h&]”uh1j h³hÇh´Måhj7h²hubeh}”(h]”Œparameter-helper-functions”ah ]”h"]”Œparameter helper functions”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´Màubeh}”(h]”Œfilesystem-mount-api”ah ]”h"]”Œfilesystem mount api”ah$]”h&]”uh1hÈhhh²hh³hÇh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÇuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)�”}”(hÍNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”jƒŒfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”j›Œerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÇŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(jvjsj&j#j‘jŽjYjVjíjêj± j® j² j¯ j4j1jnjkuŒ nametypes”}”(jv‰j&‰j‘‰jY‰jí‰j± ‰j² ‰j4‰jn‰uh}”(jshÊj#hëjŽj)jVj”jêj\j® jðj¯ j´ j1jµ jkj7uŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.