€•Œ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/vfs”Œ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/vfs”Œ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/vfs”Œ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/vfs”Œ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/vfs”Œ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/vfs”Œ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/vfs”Œ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³Œ=/var/lib/git/docbuild/linux/Documentation/filesystems/vfs.rst”h´KubhŒsection”“”)�”}”(hhh]”(hŒtitle”“”)�”}”(hŒ)Overview of the Linux Virtual File System”h]”hŒ)Overview of the Linux Virtual File System”…”�”}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhŒ paragraph”“”)�”}”(hŒ5Original author: Richard Gooch ”h]”(hŒ Original author: Richard Gooch <”…”�”}”(hhßh²hh³Nh´NubhŒ reference”“”)�”}”(hŒrgooch@atnf.csiro.au”h]”hŒrgooch@atnf.csiro.au”…”�”}”(hhéh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œmailto:rgooch@atnf.csiro.au”uh1hçhhßubhŒ>”…”�”}”(hhßh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhŒ bullet_list”“”)�”}”(hhh]”(hŒ list_item”“”)�”}”(hŒ Copyright (C) 1999 Richard Gooch”h]”hÞ)�”}”(hj h]”hŒ Copyright (C) 1999 Richard Gooch”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K hj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjh²hh³hÇh´Nubj )�”}”(hŒ!Copyright (C) 2005 Pekka Enberg ”h]”hÞ)�”}”(hŒCopyright (C) 2005 Pekka Enberg”h]”hŒCopyright (C) 2005 Pekka Enberg”…”�”}”(hj%h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K hj!ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1jh³hÇh´K hhÊh²hubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ Introduction”h]”hŒ Introduction”…”�”}”(hjDh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjAh²hh³hÇh´KubhÞ)�”}”(hXThe Virtual File System (also known as the Virtual Filesystem Switch) is the software layer in the kernel that provides the filesystem interface to userspace programs. It also provides an abstraction within the kernel which allows different filesystem implementations to coexist.”h]”hXThe Virtual File System (also known as the Virtual Filesystem Switch) is the software layer in the kernel that provides the filesystem interface to userspace programs. It also provides an abstraction within the kernel which allows different filesystem implementations to coexist.”…”�”}”(hjRh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhjAh²hubhÞ)�”}”(hŒÃVFS system calls open(2), stat(2), read(2), write(2), chmod(2) and so on are called from a process context. Filesystem locking is described in the document Documentation/filesystems/locking.rst.”h]”hŒÃVFS system calls open(2), stat(2), read(2), write(2), chmod(2) and so on are called from a process context. Filesystem locking is described in the document Documentation/filesystems/locking.rst.”…”�”}”(hj`h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhjAh²hubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒDirectory Entry Cache (dcache)”h]”hŒDirectory Entry Cache (dcache)”…”�”}”(hjqh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjnh²hh³hÇh´KubhÞ)�”}”(hX¡The VFS implements the open(2), stat(2), chmod(2), and similar system calls. The pathname argument that is passed to them is used by the VFS to search through the directory entry cache (also known as the dentry cache or dcache). This provides a very fast look-up mechanism to translate a pathname (filename) into a specific dentry. Dentries live in RAM and are never saved to disc: they exist only for performance.”h]”hX¡The VFS implements the open(2), stat(2), chmod(2), and similar system calls. The pathname argument that is passed to them is used by the VFS to search through the directory entry cache (also known as the dentry cache or dcache). This provides a very fast look-up mechanism to translate a pathname (filename) into a specific dentry. Dentries live in RAM and are never saved to disc: they exist only for performance.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khjnh²hubhÞ)�”}”(hXbThe dentry cache is meant to be a view into your entire filespace. As most computers cannot fit all dentries in the RAM at the same time, some bits of the cache are missing. In order to resolve your pathname into a dentry, the VFS may have to resort to creating dentries along the way, and then loading the inode. This is done by looking up the inode.”h]”hXbThe dentry cache is meant to be a view into your entire filespace. As most computers cannot fit all dentries in the RAM at the same time, some bits of the cache are missing. In order to resolve your pathname into a dentry, the VFS may have to resort to creating dentries along the way, and then loading the inode. This is done by looking up the inode.”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K$hjnh²hubeh}”(h]”Œdirectory-entry-cache-dcache”ah ]”h"]”h$]”Œdirectory entry cache (dcache)”ah&]”uh1hÈhjAh²hh³hÇh´KŒ referenced”KubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒThe Inode Object”h]”hŒThe Inode Object”…”�”}”(hj§h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj¤h²hh³hÇh´K,ubhÞ)�”}”(hXÏAn individual dentry usually has a pointer to an inode. Inodes are filesystem objects such as regular files, directories, FIFOs and other beasts. They live either on the disc (for block device filesystems) or in the memory (for pseudo filesystems). Inodes that live on the disc are copied into the memory when required and changes to the inode are written back to disc. A single inode can be pointed to by multiple dentries (hard links, for example, do this).”h]”hXÏAn individual dentry usually has a pointer to an inode. Inodes are filesystem objects such as regular files, directories, FIFOs and other beasts. They live either on the disc (for block device filesystems) or in the memory (for pseudo filesystems). Inodes that live on the disc are copied into the memory when required and changes to the inode are written back to disc. A single inode can be pointed to by multiple dentries (hard links, for example, do this).”…”�”}”(hjµh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K.hj¤h²hubhÞ)�”}”(hXèTo look up an inode requires that the VFS calls the lookup() method of the parent directory inode. This method is installed by the specific filesystem implementation that the inode lives in. Once the VFS has the required dentry (and hence the inode), we can do all those boring things like open(2) the file, or stat(2) it to peek at the inode data. The stat(2) operation is fairly simple: once the VFS has the dentry, it peeks at the inode data and passes some of it back to userspace.”h]”hXèTo look up an inode requires that the VFS calls the lookup() method of the parent directory inode. This method is installed by the specific filesystem implementation that the inode lives in. Once the VFS has the required dentry (and hence the inode), we can do all those boring things like open(2) the file, or stat(2) it to peek at the inode data. The stat(2) operation is fairly simple: once the VFS has the dentry, it peeks at the inode data and passes some of it back to userspace.”…”�”}”(hjÃh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K6hj¤h²hubeh}”(h]”Œthe-inode-object”ah ]”h"]”h$]”Œthe inode object”ah&]”uh1hÈhjAh²hh³hÇh´K,j£KubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒThe File Object”h]”hŒThe File Object”…”�”}”(hjÜh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjÙh²hh³hÇh´K@ubhÞ)�”}”(hXOpening a file requires another operation: allocation of a file structure (this is the kernel-side implementation of file descriptors). The freshly allocated file structure is initialized with a pointer to the dentry and a set of file operation member functions. These are taken from the inode data. The open() file method is then called so the specific filesystem implementation can do its work. You can see that this is another switch performed by the VFS. The file structure is placed into the file descriptor table for the process.”h]”hXOpening a file requires another operation: allocation of a file structure (this is the kernel-side implementation of file descriptors). The freshly allocated file structure is initialized with a pointer to the dentry and a set of file operation member functions. These are taken from the inode data. The open() file method is then called so the specific filesystem implementation can do its work. You can see that this is another switch performed by the VFS. The file structure is placed into the file descriptor table for the process.”…”�”}”(hjêh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KBhjÙh²hubhÞ)�”}”(hXcReading, writing and closing files (and other assorted VFS operations) is done by using the userspace file descriptor to grab the appropriate file structure, and then calling the required file structure method to do whatever is required. For as long as the file is open, it keeps the dentry in use, which in turn means that the VFS inode is still in use.”h]”hXcReading, writing and closing files (and other assorted VFS operations) is done by using the userspace file descriptor to grab the appropriate file structure, and then calling the required file structure method to do whatever is required. For as long as the file is open, it keeps the dentry in use, which in turn means that the VFS inode is still in use.”…”�”}”(hjøh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KKhjÙh²hubeh}”(h]”Œthe-file-object”ah ]”h"]”h$]”Œthe file object”ah&]”uh1hÈhjAh²hh³hÇh´K@j£Kubeh}”(h]”Œ introduction”ah ]”h"]”Œ introduction”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ%Registering and Mounting a Filesystem”h]”hŒ%Registering and Mounting a Filesystem”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjh²hh³hÇh´KSubhÞ)�”}”(hŒITo register and unregister a filesystem, use the following API functions:”h]”hŒITo register and unregister a filesystem, use the following API functions:”…”�”}”(hj'h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KUhjh²hubhŒ literal_block”“”)�”}”(hŒŽ#include extern int register_filesystem(struct file_system_type *); extern int unregister_filesystem(struct file_system_type *);”h]”hŒŽ#include extern int register_filesystem(struct file_system_type *); extern int unregister_filesystem(struct file_system_type *);”…”�”}”hj7sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆŒforce”‰Œlanguage”Œc”Œhighlight_args”}”uh1j5h³hÇh´KXhjh²hubhÞ)�”}”(hXThe passed struct file_system_type describes your filesystem. When a request is made to mount a filesystem onto a directory in your namespace, the VFS will call the appropriate get_tree() method for the specific filesystem. See Documentation/filesystems/mount_api.rst for more details.”h]”hXThe passed struct file_system_type describes your filesystem. When a request is made to mount a filesystem onto a directory in your namespace, the VFS will call the appropriate get_tree() method for the specific filesystem. See Documentation/filesystems/mount_api.rst for more details.”…”�”}”(hjJh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K_hjh²hubhÞ)�”}”(hŒ\You can see all filesystems that are registered to the kernel in the file /proc/filesystems.”h]”hŒ\You can see all filesystems that are registered to the kernel in the file /proc/filesystems.”…”�”}”(hjXh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Kehjh²hubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒstruct file_system_type”h]”hŒstruct file_system_type”…”�”}”(hjih²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjfh²hh³hÇh´KjubhÞ)�”}”(hŒBThis describes the filesystem. The following members are defined:”h]”hŒBThis describes the filesystem. The following members are defined:”…”�”}”(hjwh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Klhjfh²hubj6)�”}”(hXÎstruct file_system_type { const char *name; int fs_flags; int (*init_fs_context)(struct fs_context *); const struct fs_parameter_spec *parameters; void (*kill_sb) (struct super_block *); struct module *owner; struct file_system_type * next; struct hlist_head fs_supers; struct lock_class_key s_lock_key; struct lock_class_key s_umount_key; struct lock_class_key s_vfs_rename_key; struct lock_class_key s_writers_key[SB_FREEZE_LEVELS]; struct lock_class_key i_lock_key; struct lock_class_key i_mutex_key; struct lock_class_key invalidate_lock_key; struct lock_class_key i_mutex_dir_key; };”h]”hXÎstruct file_system_type { const char *name; int fs_flags; int (*init_fs_context)(struct fs_context *); const struct fs_parameter_spec *parameters; void (*kill_sb) (struct super_block *); struct module *owner; struct file_system_type * next; struct hlist_head fs_supers; struct lock_class_key s_lock_key; struct lock_class_key s_umount_key; struct lock_class_key s_vfs_rename_key; struct lock_class_key s_writers_key[SB_FREEZE_LEVELS]; struct lock_class_key i_lock_key; struct lock_class_key i_mutex_key; struct lock_class_key invalidate_lock_key; struct lock_class_key i_mutex_dir_key; };”…”�”}”hj…sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆjE‰jFjGjH}”uh1j5h³hÇh´Kohjfh²hubhŒdefinition_list”“”)�”}”(hhh]”(hŒdefinition_list_item”“”)�”}”(hŒW``name`` the name of the filesystem type, such as "ext2", "iso9660", "msdos" and so on ”h]”(hŒterm”“”)�”}”(hŒ``name``”h]”hŒliteral”“”)�”}”(hj£h]”hŒname”…”�”}”(hj§h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj¡ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´Kˆhj›ubhŒ definition”“”)�”}”(hhh]”hÞ)�”}”(hŒMthe name of the filesystem type, such as "ext2", "iso9660", "msdos" and so on”h]”hŒYthe name of the filesystem type, such as “ext2â€�, “iso9660â€�, “msdosâ€� and so on”…”�”}”(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™h³hÇh´Kˆhj–ubjš)�”}”(hŒF``fs_flags`` various flags (i.e. FS_REQUIRES_DEV, FS_NO_DCACHE, etc.) ”h]”(j )�”}”(hŒ ``fs_flags``”h]”j¦)�”}”(hjßh]”hŒfs_flags”…”�”}”(hjáh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjÝubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´K‹hjÙubj»)�”}”(hhh]”hÞ)�”}”(hŒ8various flags (i.e. FS_REQUIRES_DEV, FS_NO_DCACHE, etc.)”h]”hŒ8various flags (i.e. FS_REQUIRES_DEV, FS_NO_DCACHE, etc.)”…”�”}”(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™h³hÇh´K‹hj–h²hubjš)�”}”(hŒq``init_fs_context`` Initializes 'struct fs_context' ->ops and ->fs_private fields with filesystem-specific data. ”h]”(j )�”}”(hŒ``init_fs_context``”h]”j¦)�”}”(hjh]”hŒinit_fs_context”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´K�hjubj»)�”}”(hhh]”hÞ)�”}”(hŒ\Initializes 'struct fs_context' ->ops and ->fs_private fields with filesystem-specific data.”h]”hŒ`Initializes ‘struct fs_context’ ->ops and ->fs_private fields with filesystem-specific data.”…”�”}”(hj/h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KŽhj,ubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´K�hj–h²hubjš)�”}”(hŒ›``parameters`` Pointer to the array of filesystem parameters descriptors 'struct fs_parameter_spec'. More info in Documentation/filesystems/mount_api.rst. ”h]”(j )�”}”(hŒ``parameters``”h]”j¦)�”}”(hjOh]”hŒ parameters”…”�”}”(hjQh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjMubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´K”hjIubj»)�”}”(hhh]”hÞ)�”}”(hŒ‹Pointer to the array of filesystem parameters descriptors 'struct fs_parameter_spec'. More info in Documentation/filesystems/mount_api.rst.”h]”hŒ�Pointer to the array of filesystem parameters descriptors ‘struct fs_parameter_spec’. More info in Documentation/filesystems/mount_api.rst.”…”�”}”(hjgh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K’hjdubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhjIubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´K”hj–h²hubjš)�”}”(hŒX``kill_sb`` the method to call when an instance of this filesystem should be shut down ”h]”(j )�”}”(hŒ ``kill_sb``”h]”j¦)�”}”(hj‡h]”hŒkill_sb”…”�”}”(hj‰h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj…ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´K™hj�ubj»)�”}”(hhh]”hÞ)�”}”(hŒJthe method to call when an instance of this filesystem should be shut down”h]”hŒJthe method to call when an instance of this filesystem should be shut down”…”�”}”(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™h³hÇh´K™hj–h²hubjš)�”}”(hŒY``owner`` for internal VFS use: you should initialize this to THIS_MODULE in most cases. ”h]”(j )�”}”(hŒ ``owner``”h]”j¦)�”}”(hj¿h]”hŒowner”…”�”}”(hjÁh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj½ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´K�hj¹ubj»)�”}”(hhh]”hÞ)�”}”(hŒNfor internal VFS use: you should initialize this to THIS_MODULE in most cases.”h]”hŒNfor internal VFS use: you should initialize this to THIS_MODULE in most cases.”…”�”}”(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™h³hÇh´K�hj–h²hubjš)�”}”(hŒB``next`` for internal VFS use: you should initialize this to NULL ”h]”(j )�”}”(hŒ``next``”h]”j¦)�”}”(hj÷h]”hŒnext”…”�”}”(hjùh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjõubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´K hjñubj»)�”}”(hhh]”hÞ)�”}”(hŒ8for internal VFS use: you should initialize this to NULL”h]”hŒ8for internal VFS use: you should initialize this to NULL”…”�”}”(hjh²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™h³hÇh´K hj–h²hubjš)�”}”(hŒâ``fs_supers`` for internal VFS use: hlist of filesystem instances (superblocks) s_lock_key, s_umount_key, s_vfs_rename_key, s_writers_key, i_lock_key, i_mutex_key, invalidate_lock_key, i_mutex_dir_key: lockdep-specific ”h]”(j )�”}”(hŒ ``fs_supers``”h]”j¦)�”}”(hj/h]”hŒ fs_supers”…”�”}”(hj1h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj-ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´K¦hj)ubj»)�”}”(hhh]”(hŒ block_quote”“”)�”}”(hŒBfor internal VFS use: hlist of filesystem instances (superblocks) ”h]”hÞ)�”}”(hŒAfor internal VFS use: hlist of filesystem instances (superblocks)”h]”hŒAfor internal VFS use: hlist of filesystem instances (superblocks)”…”�”}”(hjMh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K£hjIubah}”(h]”h ]”h"]”h$]”h&]”uh1jGh³hÇh´K£hjDubhÞ)�”}”(hŒŠs_lock_key, s_umount_key, s_vfs_rename_key, s_writers_key, i_lock_key, i_mutex_key, invalidate_lock_key, i_mutex_dir_key: lockdep-specific”h]”hŒŠs_lock_key, s_umount_key, s_vfs_rename_key, s_writers_key, i_lock_key, i_mutex_key, invalidate_lock_key, i_mutex_dir_key: lockdep-specific”…”�”}”(hjah²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K¥hjDubeh}”(h]”h ]”h"]”h$]”h&]”uh1jºhj)ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´K¦hj–h²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1j”hjfh²hh³hÇh´Nubeh}”(h]”Œstruct-file-system-type”ah ]”h"]”Œstruct file_system_type”ah$]”h&]”uh1hÈhjh²hh³hÇh´Kjubeh}”(h]”Œ%registering-and-mounting-a-filesystem”ah ]”h"]”Œ%registering and mounting a filesystem”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KSubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒThe Superblock Object”h]”hŒThe Superblock Object”…”�”}”(hj”h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj‘h²hh³hÇh´K©ubhÞ)�”}”(hŒ4A superblock object represents a mounted filesystem.”h]”hŒ4A superblock object represents a mounted filesystem.”…”�”}”(hj¢h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K«hj‘h²hubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒstruct super_operations”h]”hŒstruct super_operations”…”�”}”(hj³h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj°h²hh³hÇh´K¯ubhÞ)�”}”(hŒpThis describes how the VFS can manipulate the superblock of your filesystem. The following members are defined:”h]”hŒpThis describes how the VFS can manipulate the superblock of your filesystem. The following members are defined:”…”�”}”(hjÁh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K±hj°h²hubj6)�”}”(hXystruct super_operations { struct inode *(*alloc_inode)(struct super_block *sb); void (*destroy_inode)(struct inode *); void (*free_inode)(struct inode *); void (*dirty_inode) (struct inode *, int flags); int (*write_inode) (struct inode *, struct writeback_control *wbc); int (*drop_inode) (struct inode *); void (*evict_inode) (struct inode *); void (*put_super) (struct super_block *); int (*sync_fs)(struct super_block *sb, int wait); int (*freeze_super) (struct super_block *sb, enum freeze_holder who); int (*freeze_fs) (struct super_block *); int (*thaw_super) (struct super_block *sb, enum freeze_wholder who); int (*unfreeze_fs) (struct super_block *); int (*statfs) (struct dentry *, struct kstatfs *); void (*umount_begin) (struct super_block *); int (*show_options)(struct seq_file *, struct dentry *); int (*show_devname)(struct seq_file *, struct dentry *); int (*show_path)(struct seq_file *, struct dentry *); int (*show_stats)(struct seq_file *, struct dentry *); ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t); ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); struct dquot **(*get_dquots)(struct inode *); long (*nr_cached_objects)(struct super_block *, struct shrink_control *); long (*free_cached_objects)(struct super_block *, struct shrink_control *); };”h]”hXystruct super_operations { struct inode *(*alloc_inode)(struct super_block *sb); void (*destroy_inode)(struct inode *); void (*free_inode)(struct inode *); void (*dirty_inode) (struct inode *, int flags); int (*write_inode) (struct inode *, struct writeback_control *wbc); int (*drop_inode) (struct inode *); void (*evict_inode) (struct inode *); void (*put_super) (struct super_block *); int (*sync_fs)(struct super_block *sb, int wait); int (*freeze_super) (struct super_block *sb, enum freeze_holder who); int (*freeze_fs) (struct super_block *); int (*thaw_super) (struct super_block *sb, enum freeze_wholder who); int (*unfreeze_fs) (struct super_block *); int (*statfs) (struct dentry *, struct kstatfs *); void (*umount_begin) (struct super_block *); int (*show_options)(struct seq_file *, struct dentry *); int (*show_devname)(struct seq_file *, struct dentry *); int (*show_path)(struct seq_file *, struct dentry *); int (*show_stats)(struct seq_file *, struct dentry *); ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t); ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); struct dquot **(*get_dquots)(struct inode *); long (*nr_cached_objects)(struct super_block *, struct shrink_control *); long (*free_cached_objects)(struct super_block *, struct shrink_control *); };”…”�”}”hjÏsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆjE‰jFjGjH}”uh1j5h³hÇh´K´hj°h²hubhÞ)�”}”(hŒåAll methods are called without any locks being held, unless otherwise noted. This means that most methods can block safely. All methods are only called from a process context (i.e. not from an interrupt handler or bottom half).”h]”hŒåAll methods are called without any locks being held, unless otherwise noted. This means that most methods can block safely. All methods are only called from a process context (i.e. not from an interrupt handler or bottom half).”…”�”}”(hjÞh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KÙhj°h²hubj•)�”}”(hhh]”(jš)�”}”(hX,``alloc_inode`` this method is called by alloc_inode() to allocate memory for struct inode and initialize it. If this function is not defined, a simple 'struct inode' is allocated. Normally alloc_inode will be used to allocate a larger structure which contains a 'struct inode' embedded within it. ”h]”(j )�”}”(hŒ``alloc_inode``”h]”j¦)�”}”(hjõh]”hŒ alloc_inode”…”�”}”(hj÷h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjóubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´Kãhjïubj»)�”}”(hhh]”hÞ)�”}”(hXthis method is called by alloc_inode() to allocate memory for struct inode and initialize it. If this function is not defined, a simple 'struct inode' is allocated. Normally alloc_inode will be used to allocate a larger structure which contains a 'struct inode' embedded within it.”h]”hX#this method is called by alloc_inode() to allocate memory for struct inode and initialize it. If this function is not defined, a simple ‘struct inode’ is allocated. Normally alloc_inode will be used to allocate a larger structure which contains a ‘struct inode’ embedded within it.”…”�”}”(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™h³hÇh´Kãhjìubjš)�”}”(hŒÐ``destroy_inode`` this method is called by destroy_inode() to release resources allocated for struct inode. It is only required if ->alloc_inode was defined and simply undoes anything done by ->alloc_inode. ”h]”(j )�”}”(hŒ``destroy_inode``”h]”j¦)�”}”(hj-h]”hŒ destroy_inode”…”�”}”(hj/h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj+ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´Kéhj'ubj»)�”}”(hhh]”hÞ)�”}”(hŒ½this method is called by destroy_inode() to release resources allocated for struct inode. It is only required if ->alloc_inode was defined and simply undoes anything done by ->alloc_inode.”h]”hŒ½this method is called by destroy_inode() to release resources allocated for struct inode. It is only required if ->alloc_inode was defined and simply undoes anything done by ->alloc_inode.”…”�”}”(hjEh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KæhjBubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhj'ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´Kéhjìh²hubjš)�”}”(hŒ³``free_inode`` this method is called from RCU callback. If you use call_rcu() in ->destroy_inode to free 'struct inode' memory, then it's better to release memory in this method. ”h]”(j )�”}”(hŒ``free_inode``”h]”j¦)�”}”(hjeh]”hŒ free_inode”…”�”}”(hjgh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjcubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´Kîhj_ubj»)�”}”(hhh]”hÞ)�”}”(hŒ£this method is called from RCU callback. If you use call_rcu() in ->destroy_inode to free 'struct inode' memory, then it's better to release memory in this method.”h]”hŒ©this method is called from RCU callback. If you use call_rcu() in ->destroy_inode to free ‘struct inode’ memory, then it’s better to release memory in this method.”…”�”}”(hj}h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Kìhjzubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhj_ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´Kîhjìh²hubjš)�”}”(hX’``dirty_inode`` this method is called by the VFS when an inode is marked dirty. This is specifically for the inode itself being marked dirty, not its data. If the update needs to be persisted by fdatasync(), then I_DIRTY_DATASYNC will be set in the flags argument. I_DIRTY_TIME will be set in the flags in case lazytime is enabled and struct inode has times updated since the last ->dirty_inode call. ”h]”(j )�”}”(hŒ``dirty_inode``”h]”j¦)�”}”(hj�h]”hŒ dirty_inode”…”�”}”(hjŸh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj›ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´K÷hj—ubj»)�”}”(hhh]”hÞ)�”}”(hX�this method is called by the VFS when an inode is marked dirty. This is specifically for the inode itself being marked dirty, not its data. If the update needs to be persisted by fdatasync(), then I_DIRTY_DATASYNC will be set in the flags argument. I_DIRTY_TIME will be set in the flags in case lazytime is enabled and struct inode has times updated since the last ->dirty_inode call.”h]”hX�this method is called by the VFS when an inode is marked dirty. This is specifically for the inode itself being marked dirty, not its data. If the update needs to be persisted by fdatasync(), then I_DIRTY_DATASYNC will be set in the flags argument. I_DIRTY_TIME will be set in the flags in case lazytime is enabled and struct inode has times updated since the last ->dirty_inode call.”…”�”}”(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™h³hÇh´K÷hjìh²hubjš)�”}”(hŒÉ``write_inode`` this method is called when the VFS needs to write an inode to disc. The second parameter indicates whether the write should be synchronous or not, not all filesystems check this flag. ”h]”(j )�”}”(hŒ``write_inode``”h]”j¦)�”}”(hjÕh]”hŒ write_inode”…”�”}”(hj×h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjÓubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´KühjÏubj»)�”}”(hhh]”hÞ)�”}”(hŒ¸this method is called when the VFS needs to write an inode to disc. The second parameter indicates whether the write should be synchronous or not, not all filesystems check this flag.”h]”hŒ¸this method is called when the VFS needs to write an inode to disc. The second parameter indicates whether the write should be synchronous or not, not all filesystems check this flag.”…”�”}”(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™h³hÇh´Kühjìh²hubjš)�”}”(hX``drop_inode`` called when the last access to the inode is dropped, with the inode->i_lock spinlock held. This method should be either NULL (normal UNIX filesystem semantics) or "inode_just_drop" (for filesystems that do not want to cache inodes - causing "delete_inode" to always be called regardless of the value of i_nlink) The "inode_just_drop()" behavior is equivalent to the old practice of using "force_delete" in the put_inode() case, but does not have the races that the "force_delete()" approach had. ”h]”(j )�”}”(hŒ``drop_inode``”h]”j¦)�”}”(hj h]”hŒ drop_inode”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M hjubj»)�”}”(hhh]”(hÞ)�”}”(hŒZcalled when the last access to the inode is dropped, with the inode->i_lock spinlock held.”h]”hŒZcalled when the last access to the inode is dropped, with the inode->i_lock spinlock held.”…”�”}”(hj%h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Kÿhj"ubhÞ)�”}”(hŒÜThis method should be either NULL (normal UNIX filesystem semantics) or "inode_just_drop" (for filesystems that do not want to cache inodes - causing "delete_inode" to always be called regardless of the value of i_nlink)”h]”hŒäThis method should be either NULL (normal UNIX filesystem semantics) or “inode_just_dropâ€� (for filesystems that do not want to cache inodes - causing “delete_inodeâ€� to always be called regardless of the value of i_nlink)”…”�”}”(hj3h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Mhj"ubhÞ)�”}”(hŒ·The "inode_just_drop()" behavior is equivalent to the old practice of using "force_delete" in the put_inode() case, but does not have the races that the "force_delete()" approach had.”h]”hŒÃThe “inode_just_drop()â€� behavior is equivalent to the old practice of using “force_deleteâ€� in the put_inode() case, but does not have the races that the “force_delete()â€� approach had.”…”�”}”(hjAh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Mhj"ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jºhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´M hjìh²hubjš)�”}”(hXI``evict_inode`` called when the VFS wants to evict an inode. Caller does *not* evict the pagecache or inode-associated metadata buffers; the method has to use truncate_inode_pages_final() to get rid of those. Caller makes sure async writeback cannot be running for the inode while (or after) ->evict_inode() is called. Optional. ”h]”(j )�”}”(hŒ``evict_inode``”h]”j¦)�”}”(hjah]”hŒ evict_inode”…”�”}”(hjch²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj_ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´Mhj[ubj»)�”}”(hhh]”hÞ)�”}”(hX8called when the VFS wants to evict an inode. Caller does *not* evict the pagecache or inode-associated metadata buffers; the method has to use truncate_inode_pages_final() to get rid of those. Caller makes sure async writeback cannot be running for the inode while (or after) ->evict_inode() is called. Optional.”h]”(hŒ9called when the VFS wants to evict an inode. Caller does ”…”�”}”(hjyh²hh³Nh´NubhŒemphasis”“”)�”}”(hŒ*not*”h]”hŒnot”…”�”}”(hjƒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�hjyubhŒú evict the pagecache or inode-associated metadata buffers; the method has to use truncate_inode_pages_final() to get rid of those. Caller makes sure async writeback cannot be running for the inode while (or after) ->evict_inode() is called. Optional.”…”�”}”(hjyh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M hjvubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhj[ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´Mhjìh²hubjš)�”}”(hŒ~``put_super`` called when the VFS wishes to free the superblock (i.e. unmount). This is called with the superblock lock held ”h]”(j )�”}”(hŒ ``put_super``”h]”j¦)�”}”(hj­h]”hŒ put_super”…”�”}”(hj¯h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj«ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´Mhj§ubj»)�”}”(hhh]”hÞ)�”}”(hŒocalled when the VFS wishes to free the superblock (i.e. unmount). This is called with the superblock lock held”h]”hŒocalled when the VFS wishes to free the superblock (i.e. unmount). This is called with the superblock lock held”…”�”}”(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™h³hÇh´Mhjìh²hubjš)�”}”(hŒÊ``sync_fs`` called when VFS is writing out all dirty data associated with a superblock. The second parameter indicates whether the method should wait until the write out has been completed. Optional. ”h]”(j )�”}”(hŒ ``sync_fs``”h]”j¦)�”}”(hjåh]”hŒsync_fs”…”�”}”(hjçh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjãubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´Mhjßubj»)�”}”(hhh]”hÞ)�”}”(hŒ½called when VFS is writing out all dirty data associated with a superblock. The second parameter indicates whether the method should wait until the write out has been completed. Optional.”h]”hŒ½called when VFS is writing out all dirty data associated with a superblock. The second parameter indicates whether the method should wait until the write out has been completed. Optional.”…”�”}”(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™h³hÇh´Mhjìh²hubjš)�”}”(hX-``freeze_super`` Called instead of ->freeze_fs callback if provided. Main difference is that ->freeze_super is called without taking down_write(&sb->s_umount). If filesystem implements it and wants ->freeze_fs to be called too, then it has to call ->freeze_fs explicitly from this callback. Optional. ”h]”(j )�”}”(hŒ``freeze_super``”h]”j¦)�”}”(hjh]”hŒ freeze_super”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M hjubj»)�”}”(hhh]”hÞ)�”}”(hXCalled instead of ->freeze_fs callback if provided. Main difference is that ->freeze_super is called without taking down_write(&sb->s_umount). If filesystem implements it and wants ->freeze_fs to be called too, then it has to call ->freeze_fs explicitly from this callback. Optional.”h]”hXCalled instead of ->freeze_fs callback if provided. Main difference is that ->freeze_super is called without taking down_write(&sb->s_umount). If filesystem implements it and wants ->freeze_fs to be called too, then it has to call ->freeze_fs explicitly from this callback. Optional.”…”�”}”(hj5h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Mhj2ubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´M hjìh²hubjš)�”}”(hŒÀ``freeze_fs`` called when VFS is locking a filesystem and forcing it into a consistent state. This method is currently used by the Logical Volume Manager (LVM) and ioctl(FIFREEZE). Optional. ”h]”(j )�”}”(hŒ ``freeze_fs``”h]”j¦)�”}”(hjUh]”hŒ freeze_fs”…”�”}”(hjWh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjSubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M%hjOubj»)�”}”(hhh]”hÞ)�”}”(hŒ±called when VFS is locking a filesystem and forcing it into a consistent state. This method is currently used by the Logical Volume Manager (LVM) and ioctl(FIFREEZE). Optional.”h]”hŒ±called when VFS is locking a filesystem and forcing it into a consistent state. This method is currently used by the Logical Volume Manager (LVM) and ioctl(FIFREEZE). Optional.”…”�”}”(hjmh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M#hjjubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhjOubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´M%hjìh²hubjš)�”}”(hŒv``thaw_super`` called when VFS is unlocking a filesystem and making it writable again after ->freeze_super. Optional. ”h]”(j )�”}”(hŒ``thaw_super``”h]”j¦)�”}”(hj�h]”hŒ thaw_super”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj‹ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M)hj‡ubj»)�”}”(hhh]”hÞ)�”}”(hŒfcalled when VFS is unlocking a filesystem and making it writable again after ->freeze_super. Optional.”h]”hŒfcalled when VFS is unlocking a filesystem and making it writable again after ->freeze_super. Optional.”…”�”}”(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™h³hÇh´M)hjìh²hubjš)�”}”(hŒt``unfreeze_fs`` called when VFS is unlocking a filesystem and making it writable again after ->freeze_fs. Optional. ”h]”(j )�”}”(hŒ``unfreeze_fs``”h]”j¦)�”}”(hjÅh]”hŒ unfreeze_fs”…”�”}”(hjÇh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjÃubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M-hj¿ubj»)�”}”(hhh]”hÞ)�”}”(hŒccalled when VFS is unlocking a filesystem and making it writable again after ->freeze_fs. Optional.”h]”hŒccalled when VFS is unlocking a filesystem and making it writable again after ->freeze_fs. Optional.”…”�”}”(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™h³hÇh´M-hjìh²hubjš)�”}”(hŒC``statfs`` called when the VFS needs to get filesystem statistics. ”h]”(j )�”}”(hŒ ``statfs``”h]”j¦)�”}”(hjýh]”hŒstatfs”…”�”}”(hjÿh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjûubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M0hj÷ubj»)�”}”(hhh]”hÞ)�”}”(hŒ7called when the VFS needs to get filesystem statistics.”h]”hŒ7called when the VFS needs to get filesystem statistics.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M0hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhj÷ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´M0hjìh²hubjš)�”}”(hŒA``umount_begin`` called when the VFS is unmounting a filesystem. ”h]”(j )�”}”(hŒ``umount_begin``”h]”j¦)�”}”(hj5h]”hŒ umount_begin”…”�”}”(hj7h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj3ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M3hj/ubj»)�”}”(hhh]”hÞ)�”}”(hŒ/called when the VFS is unmounting a filesystem.”h]”hŒ/called when the VFS is unmounting a filesystem.”…”�”}”(hjMh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M3hjJubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhj/ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´M3hjìh²hubjš)�”}”(hŒ‰``show_options`` called by the VFS to show mount options for /proc//mounts and /proc//mountinfo. (see "Mount Options" section) ”h]”(j )�”}”(hŒ``show_options``”h]”j¦)�”}”(hjmh]”hŒ show_options”…”�”}”(hjoh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjkubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M8hjgubj»)�”}”(hhh]”hÞ)�”}”(hŒwcalled by the VFS to show mount options for /proc//mounts and /proc//mountinfo. (see "Mount Options" section)”h]”hŒ{called by the VFS to show mount options for /proc//mounts and /proc//mountinfo. (see “Mount Optionsâ€� section)”…”�”}”(hj…h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M6hj‚ubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhjgubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´M8hjìh²hubjš)�”}”(hŒ°``show_devname`` Optional. Called by the VFS to show device name for /proc//{mounts,mountinfo,mountstats}. If not provided then '(struct mount).mnt_devname' will be used. ”h]”(j )�”}”(hŒ``show_devname``”h]”j¦)�”}”(hj¥h]”hŒ show_devname”…”�”}”(hj§h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj£ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M=hjŸubj»)�”}”(hhh]”hÞ)�”}”(hŒžOptional. Called by the VFS to show device name for /proc//{mounts,mountinfo,mountstats}. If not provided then '(struct mount).mnt_devname' will be used.”h]”hŒ¢Optional. Called by the VFS to show device name for /proc//{mounts,mountinfo,mountstats}. If not provided then ‘(struct mount).mnt_devname’ will be used.”…”�”}”(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™h³hÇh´M=hjìh²hubjš)�”}”(hŒŠ``show_path`` Optional. Called by the VFS (for /proc//mountinfo) to show the mount root dentry path relative to the filesystem root. ”h]”(j )�”}”(hŒ ``show_path``”h]”j¦)�”}”(hjÝh]”hŒ show_path”…”�”}”(hjßh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjÛubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´MAhj×ubj»)�”}”(hhh]”hÞ)�”}”(hŒ{Optional. Called by the VFS (for /proc//mountinfo) to show the mount root dentry path relative to the filesystem root.”h]”hŒ{Optional. Called by the VFS (for /proc//mountinfo) to show the mount root dentry path relative to the filesystem root.”…”�”}”(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™h³hÇh´MAhjìh²hubjš)�”}”(hŒv``show_stats`` Optional. Called by the VFS (for /proc//mountstats) to show filesystem-specific mount statistics. ”h]”(j )�”}”(hŒ``show_stats``”h]”j¦)�”}”(hj h]”hŒ show_stats”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´MEhj ubj»)�”}”(hhh]”hÞ)�”}”(hŒfOptional. Called by the VFS (for /proc//mountstats) to show filesystem-specific mount statistics.”h]”hŒfOptional. Called by the VFS (for /proc//mountstats) to show filesystem-specific mount statistics.”…”�”}”(hj- h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MDhj* ubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´MEhjìh²hubjš)�”}”(hŒE``quota_read`` called by the VFS to read from filesystem quota file. ”h]”(j )�”}”(hŒ``quota_read``”h]”j¦)�”}”(hjM h]”hŒ quota_read”…”�”}”(hjO h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjK ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´MHhjG ubj»)�”}”(hhh]”hÞ)�”}”(hŒ5called by the VFS to read from filesystem quota file.”h]”hŒ5called by the VFS to read from filesystem quota file.”…”�”}”(hje h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MHhjb ubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhjG ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´MHhjìh²hubjš)�”}”(hŒE``quota_write`` called by the VFS to write to filesystem quota file. ”h]”(j )�”}”(hŒ``quota_write``”h]”j¦)�”}”(hj… h]”hŒ quota_write”…”�”}”(hj‡ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjƒ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´MKhj ubj»)�”}”(hhh]”hÞ)�”}”(hŒ4called by the VFS to write to filesystem quota file.”h]”hŒ4called by the VFS to write to filesystem quota file.”…”�”}”(hj� h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MKhjš ubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´MKhjìh²hubjš)�”}”(hŒ]``get_dquots`` called by quota to get 'struct dquot' array for a particular inode. Optional. ”h]”(j )�”}”(hŒ``get_dquots``”h]”j¦)�”}”(hj½ h]”hŒ get_dquots”…”�”}”(hj¿ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj» ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´MOhj· ubj»)�”}”(hhh]”hÞ)�”}”(hŒMcalled by quota to get 'struct dquot' array for a particular inode. Optional.”h]”hŒQcalled by quota to get ‘struct dquot’ array for a particular inode. Optional.”…”�”}”(hjÕ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MNhjÒ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhj· ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´MOhjìh²hubjš)�”}”(hŒš``nr_cached_objects`` called by the sb cache shrinking function for the filesystem to return the number of freeable cached objects it contains. Optional. ”h]”(j )�”}”(hŒ``nr_cached_objects``”h]”j¦)�”}”(hjõ h]”hŒnr_cached_objects”…”�”}”(hj÷ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjó ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´MThjï ubj»)�”}”(hhh]”hÞ)�”}”(hŒƒcalled by the sb cache shrinking function for the filesystem to return the number of freeable cached objects it contains. Optional.”h]”hŒƒcalled by the sb cache shrinking function for the filesystem to return the number of freeable cached objects it contains. Optional.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MRhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhjï ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´MThjìh²hubjš)�”}”(hX#``free_cache_objects`` called by the sb cache shrinking function for the filesystem to scan the number of objects indicated to try to free them. Optional, but any filesystem implementing this method needs to also implement ->nr_cached_objects for it to be called correctly. We can't do anything with any errors that the filesystem might encountered, hence the void return type. This will never be called if the VM is trying to reclaim under GFP_NOFS conditions, hence this method does not need to handle that situation itself. Implementations must include conditional reschedule calls inside any scanning loop that is done. This allows the VFS to determine appropriate scan batch sizes without having to worry about whether implementations will cause holdoff problems due to large scan batch sizes. ”h]”(j )�”}”(hŒ``free_cache_objects``”h]”j¦)�”}”(hj- h]”hŒfree_cache_objects”…”�”}”(hj/ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj+ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´Mfhj' ubj»)�”}”(hhh]”(hÞ)�”}”(hŒúcalled by the sb cache shrinking function for the filesystem to scan the number of objects indicated to try to free them. Optional, but any filesystem implementing this method needs to also implement ->nr_cached_objects for it to be called correctly.”h]”hŒúcalled by the sb cache shrinking function for the filesystem to scan the number of objects indicated to try to free them. Optional, but any filesystem implementing this method needs to also implement ->nr_cached_objects for it to be called correctly.”…”�”}”(hjE h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MWhjB ubhÞ)�”}”(hŒýWe can't do anything with any errors that the filesystem might encountered, hence the void return type. This will never be called if the VM is trying to reclaim under GFP_NOFS conditions, hence this method does not need to handle that situation itself.”h]”hŒÿWe can’t do anything with any errors that the filesystem might encountered, hence the void return type. This will never be called if the VM is trying to reclaim under GFP_NOFS conditions, hence this method does not need to handle that situation itself.”…”�”}”(hjS h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M]hjB ubhÞ)�”}”(hXImplementations must include conditional reschedule calls inside any scanning loop that is done. This allows the VFS to determine appropriate scan batch sizes without having to worry about whether implementations will cause holdoff problems due to large scan batch sizes.”h]”hXImplementations must include conditional reschedule calls inside any scanning loop that is done. This allows the VFS to determine appropriate scan batch sizes without having to worry about whether implementations will cause holdoff problems due to large scan batch sizes.”…”�”}”(hja h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MbhjB ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jºhj' ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´Mfhjìh²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1j”hj°h²hh³hÇh´NubhÞ)�”}”(hŒÃWhoever sets up the inode is responsible for filling in the "i_op" field. This is a pointer to a "struct inode_operations" which describes the methods that can be performed on individual inodes.”h]”hŒËWhoever sets up the inode is responsible for filling in the “i_opâ€� field. This is a pointer to a “struct inode_operationsâ€� which describes the methods that can be performed on individual inodes.”…”�”}”(hj� h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Mhhj°h²hubeh}”(h]”Œstruct-super-operations”ah ]”h"]”Œstruct super_operations”ah$]”h&]”uh1hÈhj‘h²hh³hÇh´K¯ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒstruct xattr_handler”h]”hŒstruct xattr_handler”…”�”}”(hjš h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj— h²hh³hÇh´MnubhÞ)�”}”(hŒµOn filesystems that support extended attributes (xattrs), the s_xattr superblock field points to a NULL-terminated array of xattr handlers. Extended attributes are name:value pairs.”h]”hŒµOn filesystems that support extended attributes (xattrs), the s_xattr superblock field points to a NULL-terminated array of xattr handlers. Extended attributes are name:value pairs.”…”�”}”(hj¨ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Mphj— h²hubj•)�”}”(hhh]”(jš)�”}”(hŒ“``name`` Indicates that the handler matches attributes with the specified name (such as "system.posix_acl_access"); the prefix field must be NULL. ”h]”(j )�”}”(hŒ``name``”h]”j¦)�”}”(hj¿ h]”hŒname”…”�”}”(hjÁ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj½ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´Mwhj¹ ubj»)�”}”(hhh]”hÞ)�”}”(hŒ‰Indicates that the handler matches attributes with the specified name (such as "system.posix_acl_access"); the prefix field must be NULL.”h]”hŒ�Indicates that the handler matches attributes with the specified name (such as “system.posix_acl_accessâ€�); the prefix field must be NULL.”…”�”}”(hj× h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MuhjÔ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhj¹ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´Mwhj¶ ubjš)�”}”(hŒŒ``prefix`` Indicates that the handler matches all attributes with the specified name prefix (such as "user."); the name field must be NULL. ”h]”(j )�”}”(hŒ ``prefix``”h]”j¦)�”}”(hj÷ h]”hŒprefix”…”�”}”(hjù h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjõ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M|hjñ ubj»)�”}”(hhh]”hÞ)�”}”(hŒ€Indicates that the handler matches all attributes with the specified name prefix (such as "user."); the name field must be NULL.”h]”hŒ„Indicates that the handler matches all attributes with the specified name prefix (such as “user.â€�); the name field must be NULL.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Mzhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhjñ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´M|hj¶ h²hubjš)�”}”(hŒ§``list`` Determine if attributes matching this xattr handler should be listed for a particular dentry. Used by some listxattr implementations like generic_listxattr. ”h]”(j )�”}”(hŒ``list``”h]”j¦)�”}”(hj/ h]”hŒlist”…”�”}”(hj1 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj- ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M�hj) ubj»)�”}”(hhh]”hÞ)�”}”(hŒ�Determine if attributes matching this xattr handler should be listed for a particular dentry. Used by some listxattr implementations like generic_listxattr.”h]”hŒ�Determine if attributes matching this xattr handler should be listed for a particular dentry. Used by some listxattr implementations like generic_listxattr.”…”�”}”(hjG h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MhjD ubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhj) ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´M�hj¶ h²hubjš)�”}”(hŒ†``get`` Called by the VFS to get the value of a particular extended attribute. This method is called by the getxattr(2) system call. ”h]”(j )�”}”(hŒ``get``”h]”j¦)�”}”(hjg h]”hŒget”…”�”}”(hji h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hje ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M†hja ubj»)�”}”(hhh]”hÞ)�”}”(hŒ}Called by the VFS to get the value of a particular extended attribute. This method is called by the getxattr(2) system call.”h]”hŒ}Called by the VFS to get the value of a particular extended attribute. This method is called by the getxattr(2) system call.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M„hj| ubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhja ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´M†hj¶ h²hubjš)�”}”(hŒé``set`` Called by the VFS to set the value of a particular extended attribute. When the new value is NULL, called to remove a particular extended attribute. This method is called by the setxattr(2) and removexattr(2) system calls. ”h]”(j )�”}”(hŒ``set``”h]”j¦)�”}”(hjŸ h]”hŒset”…”�”}”(hj¡ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj� ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´MŒhj™ ubj»)�”}”(hhh]”hÞ)�”}”(hŒàCalled by the VFS to set the value of a particular extended attribute. When the new value is NULL, called to remove a particular extended attribute. This method is called by the setxattr(2) and removexattr(2) system calls.”h]”hŒàCalled by the VFS to set the value of a particular extended attribute. When the new value is NULL, called to remove a particular extended attribute. This method is called by the setxattr(2) and removexattr(2) system calls.”…”�”}”(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™h³hÇh´MŒhj¶ h²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1j”hj— h²hh³hÇh´NubhÞ)�”}”(hŒÇWhen none of the xattr handlers of a filesystem match the specified attribute name or when a filesystem doesn't support extended attributes, the various ``*xattr(2)`` system calls return -EOPNOTSUPP.”h]”(hŒ›When none of the xattr handlers of a filesystem match the specified attribute name or when a filesystem doesn’t support extended attributes, the various ”…”�”}”(hj× h²hh³Nh´Nubj¦)�”}”(hŒ ``*xattr(2)``”h]”hŒ *xattr(2)”…”�”}”(hjß h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj× ubhŒ! system calls return -EOPNOTSUPP.”…”�”}”(hj× h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MŽhj— h²hubeh}”(h]”Œstruct-xattr-handler”ah ]”h"]”Œstruct xattr_handler”ah$]”h&]”uh1hÈhj‘h²hh³hÇh´Mnubeh}”(h]”Œthe-superblock-object”ah ]”h"]”Œthe superblock object”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K©ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒThe Inode Object”h]”hŒThe Inode Object”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj h²hh³hÇh´M”ubhÞ)�”}”(hŒ;An inode object represents an object within the filesystem.”h]”hŒ;An inode object represents an object within the filesystem.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M–hj h²hubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒstruct inode_operations”h]”hŒstruct inode_operations”…”�”}”(hj) h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj& h²hh³hÇh´MšubhÞ)�”}”(hŒ~This describes how the VFS can manipulate an inode in your filesystem. As of kernel 2.6.22, the following members are defined:”h]”hŒ~This describes how the VFS can manipulate an inode in your filesystem. As of kernel 2.6.22, the following members are defined:”…”�”}”(hj7 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Mœhj& h²hubj6)�”}”(hX–struct inode_operations { int (*create) (struct mnt_idmap *, struct inode *,struct dentry *, umode_t); struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int); int (*link) (struct dentry *,struct inode *,struct dentry *); int (*unlink) (struct inode *,struct dentry *); int (*symlink) (struct mnt_idmap *, struct inode *,struct dentry *,const char *); struct dentry *(*mkdir) (struct mnt_idmap *, struct inode *,struct dentry *,umode_t); int (*rmdir) (struct inode *,struct dentry *); int (*mknod) (struct mnt_idmap *, struct inode *,struct dentry *,umode_t,dev_t); int (*rename) (struct mnt_idmap *, struct inode *, struct dentry *, struct inode *, struct dentry *, unsigned int); int (*readlink) (struct dentry *, char __user *,int); const char *(*get_link) (struct dentry *, struct inode *, struct delayed_call *); int (*permission) (struct mnt_idmap *, struct inode *, int); struct posix_acl * (*get_inode_acl)(struct inode *, int, bool); int (*setattr) (struct mnt_idmap *, struct dentry *, struct iattr *); int (*getattr) (struct mnt_idmap *, const struct path *, struct kstat *, u32, unsigned int); ssize_t (*listxattr) (struct dentry *, char *, size_t); void (*update_time)(struct inode *inode, enum fs_update_time type, int flags); void (*sync_lazytime)(struct inode *inode); int (*atomic_open)(struct inode *, struct dentry *, struct file *, unsigned open_flag, umode_t create_mode); int (*tmpfile) (struct mnt_idmap *, struct inode *, struct file *, umode_t); struct posix_acl * (*get_acl)(struct mnt_idmap *, struct dentry *, int); int (*set_acl)(struct mnt_idmap *, struct dentry *, struct posix_acl *, int); int (*fileattr_set)(struct mnt_idmap *idmap, struct dentry *dentry, struct file_kattr *fa); int (*fileattr_get)(struct dentry *dentry, struct file_kattr *fa); struct offset_ctx *(*get_offset_ctx)(struct inode *inode); };”h]”hX–struct inode_operations { int (*create) (struct mnt_idmap *, struct inode *,struct dentry *, umode_t); struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int); int (*link) (struct dentry *,struct inode *,struct dentry *); int (*unlink) (struct inode *,struct dentry *); int (*symlink) (struct mnt_idmap *, struct inode *,struct dentry *,const char *); struct dentry *(*mkdir) (struct mnt_idmap *, struct inode *,struct dentry *,umode_t); int (*rmdir) (struct inode *,struct dentry *); int (*mknod) (struct mnt_idmap *, struct inode *,struct dentry *,umode_t,dev_t); int (*rename) (struct mnt_idmap *, struct inode *, struct dentry *, struct inode *, struct dentry *, unsigned int); int (*readlink) (struct dentry *, char __user *,int); const char *(*get_link) (struct dentry *, struct inode *, struct delayed_call *); int (*permission) (struct mnt_idmap *, struct inode *, int); struct posix_acl * (*get_inode_acl)(struct inode *, int, bool); int (*setattr) (struct mnt_idmap *, struct dentry *, struct iattr *); int (*getattr) (struct mnt_idmap *, const struct path *, struct kstat *, u32, unsigned int); ssize_t (*listxattr) (struct dentry *, char *, size_t); void (*update_time)(struct inode *inode, enum fs_update_time type, int flags); void (*sync_lazytime)(struct inode *inode); int (*atomic_open)(struct inode *, struct dentry *, struct file *, unsigned open_flag, umode_t create_mode); int (*tmpfile) (struct mnt_idmap *, struct inode *, struct file *, umode_t); struct posix_acl * (*get_acl)(struct mnt_idmap *, struct dentry *, int); int (*set_acl)(struct mnt_idmap *, struct dentry *, struct posix_acl *, int); int (*fileattr_set)(struct mnt_idmap *idmap, struct dentry *dentry, struct file_kattr *fa); int (*fileattr_get)(struct dentry *dentry, struct file_kattr *fa); struct offset_ctx *(*get_offset_ctx)(struct inode *inode); };”…”�”}”hjE sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆjE‰jFjGjH}”uh1j5h³hÇh´MŸhj& h²hubhÞ)�”}”(hŒSAgain, all methods are called without any locks being held, unless otherwise noted.”h]”hŒSAgain, all methods are called without any locks being held, unless otherwise noted.”…”�”}”(hjT h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MÂhj& h²hubj•)�”}”(hhh]”(jš)�”}”(hX``create`` called by the open(2) and creat(2) system calls. Only required if you want to support regular files. The dentry you get should not have an inode (i.e. it should be a negative dentry). Here you will probably call d_instantiate() with the dentry and the newly created inode ”h]”(j )�”}”(hŒ ``create``”h]”j¦)�”}”(hjk h]”hŒcreate”…”�”}”(hjm h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hji ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´MÊhje ubj»)�”}”(hhh]”hÞ)�”}”(hXcalled by the open(2) and creat(2) system calls. Only required if you want to support regular files. The dentry you get should not have an inode (i.e. it should be a negative dentry). Here you will probably call d_instantiate() with the dentry and the newly created inode”h]”hXcalled by the open(2) and creat(2) system calls. Only required if you want to support regular files. The dentry you get should not have an inode (i.e. it should be a negative dentry). Here you will probably call d_instantiate() with the dentry and the newly created inode”…”�”}”(hjƒ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MÆhj€ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhje ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´MÊhjb ubjš)�”}”(hX ``lookup`` called when the VFS needs to look up an inode in a parent directory. The name to look for is found in the dentry. This method must call d_add() to insert the found inode into the dentry. The "i_count" field in the inode structure should be incremented. If the named inode does not exist a NULL inode should be inserted into the dentry (this is called a negative dentry). Returning an error code from this routine must only be done on a real error, otherwise creating inodes with system calls like create(2), mknod(2), mkdir(2) and so on will fail. If you wish to overload the dentry methods then you should initialise the "d_dop" field in the dentry; this is a pointer to a struct "dentry_operations". This method is called with the directory inode semaphore held ”•h]”(j )�”}”(hŒ ``lookup``”h]”j¦)�”}”(hj£ h]”hŒlookup”…”�”}”(hj¥ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj¡ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´MÙhj� ubj»)�”}”(hhh]”hÞ)�”}”(hXcalled when the VFS needs to look up an inode in a parent directory. The name to look for is found in the dentry. This method must call d_add() to insert the found inode into the dentry. The "i_count" field in the inode structure should be incremented. If the named inode does not exist a NULL inode should be inserted into the dentry (this is called a negative dentry). Returning an error code from this routine must only be done on a real error, otherwise creating inodes with system calls like create(2), mknod(2), mkdir(2) and so on will fail. If you wish to overload the dentry methods then you should initialise the "d_dop" field in the dentry; this is a pointer to a struct "dentry_operations". This method is called with the directory inode semaphore held”h]”hX called when the VFS needs to look up an inode in a parent directory. The name to look for is found in the dentry. This method must call d_add() to insert the found inode into the dentry. The “i_countâ€� field in the inode structure should be incremented. If the named inode does not exist a NULL inode should be inserted into the dentry (this is called a negative dentry). Returning an error code from this routine must only be done on a real error, otherwise creating inodes with system calls like create(2), mknod(2), mkdir(2) and so on will fail. If you wish to overload the dentry methods then you should initialise the “d_dopâ€� field in the dentry; this is a pointer to a struct “dentry_operationsâ€�. This method is called with the directory inode semaphore held”…”�”}”(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™h³hÇh´MÙhjb h²hubjš)�”}”(hŒ·``link`` called by the link(2) system call. Only required if you want to support hard links. You will probably need to call d_instantiate() just as you would in the create() method ”h]”(j )�”}”(hŒ``link``”h]”j¦)�”}”(hjÛ h]”hŒlink”…”�”}”(hjÝ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjÙ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´MÞhjÕ ubj»)�”}”(hhh]”hÞ)�”}”(hŒ­called by the link(2) system call. Only required if you want to support hard links. You will probably need to call d_instantiate() just as you would in the create() method”h]”hŒ­called by the link(2) system call. Only required if you want to support hard links. You will probably need to call d_instantiate() just as you would in the create() method”…”�”}”(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™h³hÇh´MÞhjb h²hubjš)�”}”(hŒf``unlink`` called by the unlink(2) system call. Only required if you want to support deleting inodes ”h]”(j )�”}”(hŒ ``unlink``”h]”j¦)�”}”(hj h]”hŒunlink”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´Mâhj ubj»)�”}”(hhh]”hÞ)�”}”(hŒZcalled by the unlink(2) system call. Only required if you want to support deleting inodes”h]”hŒZcalled by the unlink(2) system call. Only required if you want to support deleting inodes”…”�”}”(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™h³hÇh´Mâhjb h²hubjš)�”}”(hŒ»``symlink`` called by the symlink(2) system call. Only required if you want to support symlinks. You will probably need to call d_instantiate() just as you would in the create() method ”h]”(j )�”}”(hŒ ``symlink``”h]”j¦)�”}”(hjK h]”hŒsymlink”…”�”}”(hjM h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjI ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´MçhjE ubj»)�”}”(hhh]”hÞ)�”}”(hŒ®called by the symlink(2) system call. Only required if you want to support symlinks. You will probably need to call d_instantiate() just as you would in the create() method”h]”hŒ®called by the symlink(2) system call. Only required if you want to support symlinks. You will probably need to call d_instantiate() just as you would in the create() method”…”�”}”(hjc h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Måhj` ubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhjE ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´Mçhjb h²hubjš)�”}”(hXv``mkdir`` called by the mkdir(2) system call. Only required if you want to support creating subdirectories. You will probably need to call d_instantiate_new() just as you would in the create() method. If d_instantiate_new() is not used and if the fh_to_dentry() export operation is provided, or if the storage might be accessible by another path (e.g. with a network filesystem) then more care may be needed. Importantly d_instantate() should not be used with an inode that is no longer I_NEW if there any chance that the inode could already be attached to a dentry. This is because of a hard rule in the VFS that a directory must only ever have one dentry. For example, if an NFS filesystem is mounted twice the new directory could be visible on the other mount before it is on the original mount, and a pair of name_to_handle_at(), open_by_handle_at() calls could instantiate the directory inode with an IS_ROOT() dentry before the first mkdir returns. If there is any chance this could happen, then the new inode should be d_drop()ed and attached with d_splice_alias(). The returned dentry (if any) should be returned by ->mkdir(). ”h]”(j )�”}”(hŒ ``mkdir``”h]”j¦)�”}”(hjƒ h]”hŒmkdir”…”�”}”(hj… h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj� ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´Mÿhj} ubj»)�”}”(hhh]”(hÞ)�”}”(hŒÀcalled by the mkdir(2) system call. Only required if you want to support creating subdirectories. You will probably need to call d_instantiate_new() just as you would in the create() method.”h]”hŒÀcalled by the mkdir(2) system call. Only required if you want to support creating subdirectories. You will probably need to call d_instantiate_new() just as you would in the create() method.”…”�”}”(hj› h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Mêhj˜ ubhÞ)�”}”(hXÉIf d_instantiate_new() is not used and if the fh_to_dentry() export operation is provided, or if the storage might be accessible by another path (e.g. with a network filesystem) then more care may be needed. Importantly d_instantate() should not be used with an inode that is no longer I_NEW if there any chance that the inode could already be attached to a dentry. This is because of a hard rule in the VFS that a directory must only ever have one dentry.”h]”hXÉIf d_instantiate_new() is not used and if the fh_to_dentry() export operation is provided, or if the storage might be accessible by another path (e.g. with a network filesystem) then more care may be needed. Importantly d_instantate() should not be used with an inode that is no longer I_NEW if there any chance that the inode could already be attached to a dentry. This is because of a hard rule in the VFS that a directory must only ever have one dentry.”…”�”}”(hj© h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Mîhj˜ ubhÞ)�”}”(hX(For example, if an NFS filesystem is mounted twice the new directory could be visible on the other mount before it is on the original mount, and a pair of name_to_handle_at(), open_by_handle_at() calls could instantiate the directory inode with an IS_ROOT() dentry before the first mkdir returns.”h]”hX(For example, if an NFS filesystem is mounted twice the new directory could be visible on the other mount before it is on the original mount, and a pair of name_to_handle_at(), open_by_handle_at() calls could instantiate the directory inode with an IS_ROOT() dentry before the first mkdir returns.”…”�”}”(hj· h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M÷hj˜ ubhÞ)�”}”(hŒ´If there is any chance this could happen, then the new inode should be d_drop()ed and attached with d_splice_alias(). The returned dentry (if any) should be returned by ->mkdir().”h]”hŒ´If there is any chance this could happen, then the new inode should be d_drop()ed and attached with d_splice_alias(). The returned dentry (if any) should be returned by ->mkdir().”…”�”}”(hjÅ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Mýhj˜ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jºhj} ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´Mÿhjb h²hubjš)�”}”(hŒl``rmdir`` called by the rmdir(2) system call. Only required if you want to support deleting subdirectories ”h]”(j )�”}”(hŒ ``rmdir``”h]”j¦)�”}”(hjå h]”hŒrmdir”…”�”}”(hjç h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjã ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´Mhjß ubj»)�”}”(hhh]”hÞ)�”}”(hŒacalled by the rmdir(2) system call. Only required if you want to support deleting subdirectories”h]”hŒacalled by the rmdir(2) system call. Only required if you want to support deleting subdirectories”…”�”}”(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™h³hÇh´Mhjb h²hubjš)�”}”(hX``mknod`` called by the mknod(2) system call to create a device (char, block) inode or a named pipe (FIFO) or socket. Only required if you want to support creating these types of inodes. You will probably need to call d_instantiate() just as you would in the create() method ”h]”(j )�”}”(hŒ ``mknod``”h]”j¦)�”}”(hjh]”hŒmknod”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M hjubj»)�”}”(hhh]”hÞ)�”}”(hX called by the mknod(2) system call to create a device (char, block) inode or a named pipe (FIFO) or socket. Only required if you want to support creating these types of inodes. You will probably need to call d_instantiate() just as you would in the create() method”h]”hX called by the mknod(2) system call to create a device (char, block) inode or a named pipe (FIFO) or socket. Only required if you want to support creating these types of inodes. You will probably need to call d_instantiate() just as you would in the create() method”…”�”}”(hj5h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Mhj2ubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´M hjb h²hubjš)�”}”(hX»``rename`` called by the rename(2) system call to rename the object to have the parent and name given by the second inode and dentry. The filesystem must return -EINVAL for any unsupported or unknown flags. Currently the following flags are implemented: (1) RENAME_NOREPLACE: this flag indicates that if the target of the rename exists the rename should fail with -EEXIST instead of replacing the target. The VFS already checks for existence, so for local filesystems the RENAME_NOREPLACE implementation is equivalent to plain rename. (2) RENAME_EXCHANGE: exchange source and target. Both must exist; this is checked by the VFS. Unlike plain rename, source and target may be of different type. ”h]”(j )�”}”(hŒ ``rename``”h]”j¦)�”}”(hjUh]”hŒrename”…”�”}”(hjWh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjSubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´MhjOubj»)�”}”(hhh]”(hÞ)�”}”(hŒzcalled by the rename(2) system call to rename the object to have the parent and name given by the second inode and dentry.”h]”hŒzcalled by the rename(2) system call to rename the object to have the parent and name given by the second inode and dentry.”…”�”}”(hjmh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M hjjubhÞ)�”}”(hX3The filesystem must return -EINVAL for any unsupported or unknown flags. Currently the following flags are implemented: (1) RENAME_NOREPLACE: this flag indicates that if the target of the rename exists the rename should fail with -EEXIST instead of replacing the target. The VFS already checks for existence, so for local filesystems the RENAME_NOREPLACE implementation is equivalent to plain rename. (2) RENAME_EXCHANGE: exchange source and target. Both must exist; this is checked by the VFS. Unlike plain rename, source and target may be of different type.”h]”hX3The filesystem must return -EINVAL for any unsupported or unknown flags. Currently the following flags are implemented: (1) RENAME_NOREPLACE: this flag indicates that if the target of the rename exists the rename should fail with -EEXIST instead of replacing the target. The VFS already checks for existence, so for local filesystems the RENAME_NOREPLACE implementation is equivalent to plain rename. (2) RENAME_EXCHANGE: exchange source and target. Both must exist; this is checked by the VFS. Unlike plain rename, source and target may be of different type.”…”�”}”(hj{h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Mhjjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jºhjOubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´Mhjb h²hubjš)�”}”(hX``get_link`` called by the VFS to follow a symbolic link to the inode it points to. Only required if you want to support symbolic links. This method returns the symlink body to traverse (and possibly resets the current position with nd_jump_link()). If the body won't go away until the inode is gone, nothing else is needed; if it needs to be otherwise pinned, arrange for its release by having get_link(..., ..., done) do set_delayed_call(done, destructor, argument). In that case destructor(argument) will be called once VFS is done with the body you've returned. May be called in RCU mode; that is indicated by NULL dentry argument. If request can't be handled without leaving RCU mode, have it return ERR_PTR(-ECHILD). If the filesystem stores the symlink target in ->i_link, the VFS may use it directly without calling ->get_link(); however, ->get_link() must still be provided. ->i_link must not be freed until after an RCU grace period. Writing to ->i_link post-iget() time requires a 'release' memory barrier. ”h]”(j )�”}”(hŒ ``get_link``”h]”j¦)�”}”(hj›h]”hŒget_link”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj™ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M-hj•ubj»)�”}”(hhh]”(hÞ)�”}”(hXÊcalled by the VFS to follow a symbolic link to the inode it points to. Only required if you want to support symbolic links. This method returns the symlink body to traverse (and possibly resets the current position with nd_jump_link()). If the body won't go away until the inode is gone, nothing else is needed; if it needs to be otherwise pinned, arrange for its release by having get_link(..., ..., done) do set_delayed_call(done, destructor, argument). In that case destructor(argument) will be called once VFS is done with the body you've returned. May be called in RCU mode; that is indicated by NULL dentry argument. If request can't be handled without leaving RCU mode, have it return ERR_PTR(-ECHILD).”h]”hXÐcalled by the VFS to follow a symbolic link to the inode it points to. Only required if you want to support symbolic links. This method returns the symlink body to traverse (and possibly resets the current position with nd_jump_link()). If the body won’t go away until the inode is gone, nothing else is needed; if it needs to be otherwise pinned, arrange for its release by having get_link(..., ..., done) do set_delayed_call(done, destructor, argument). In that case destructor(argument) will be called once VFS is done with the body you’ve returned. May be called in RCU mode; that is indicated by NULL dentry argument. If request can’t be handled without leaving RCU mode, have it return ERR_PTR(-ECHILD).”…”�”}”(hj³h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Mhj°ubhÞ)�”}”(hX(If the filesystem stores the symlink target in ->i_link, the VFS may use it directly without calling ->get_link(); however, ->get_link() must still be provided. ->i_link must not be freed until after an RCU grace period. Writing to ->i_link post-iget() time requires a 'release' memory barrier.”h]”hX,If the filesystem stores the symlink target in ->i_link, the VFS may use it directly without calling ->get_link(); however, ->get_link() must still be provided. ->i_link must not be freed until after an RCU grace period. Writing to ->i_link post-iget() time requires a ‘release’ memory barrier.”…”�”}”(hjÁh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M)hj°ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jºhj•ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´M-hjb h²hubjš)�”}”(hX``readlink`` this is now just an override for use by readlink(2) for the cases when ->get_link uses nd_jump_link() or object is not in fact a symlink. Normally filesystems should only implement ->get_link for symlinks and readlink(2) will automatically use that. ”h]”(j )�”}”(hŒ ``readlink``”h]”j¦)�”}”(hjáh]”hŒreadlink”…”�”}”(hjãh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjßubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M4hjÛubj»)�”}”(hhh]”hÞ)�”}”(hŒúthis is now just an override for use by readlink(2) for the cases when ->get_link uses nd_jump_link() or object is not in fact a symlink. Normally filesystems should only implement ->get_link for symlinks and readlink(2) will automatically use that.”h]”hŒúthis is now just an override for use by readlink(2) for the cases when ->get_link uses nd_jump_link() or object is not in fact a symlink. Normally filesystems should only implement ->get_link for symlinks and readlink(2) will automatically use that.”…”�”}”(hjùh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M0hjöubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhjÛubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´M4hjb h²hubjš)�”}”(hXr``permission`` called by the VFS to check for access rights on a POSIX-like filesystem. May be called in rcu-walk mode (mask & MAY_NOT_BLOCK). If in rcu-walk mode, the filesystem must check the permission without blocking or storing to the inode. If a situation is encountered that rcu-walk cannot handle, return -ECHILD and it will be called again in ref-walk mode. ”h]”(j )�”}”(hŒ``permission``”h]”j¦)�”}”(hjh]”hŒ permission”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M@hjubj»)�”}”(hhh]”(hÞ)�”}”(hŒHcalled by the VFS to check for access rights on a POSIX-like filesystem.”h]”hŒHcalled by the VFS to check for access rights on a POSIX-like filesystem.”…”�”}”(hj1h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M7hj.ubhÞ)�”}”(hŒŸMay be called in rcu-walk mode (mask & MAY_NOT_BLOCK). If in rcu-walk mode, the filesystem must check the permission without blocking or storing to the inode.”h]”hŒŸMay be called in rcu-walk mode (mask & MAY_NOT_BLOCK). If in rcu-walk mode, the filesystem must check the permission without blocking or storing to the inode.”…”�”}”(hj?h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M:hj.ubhÞ)�”}”(hŒwIf a situation is encountered that rcu-walk cannot handle, return -ECHILD and it will be called again in ref-walk mode.”h]”hŒwIf a situation is encountered that rcu-walk cannot handle, return -ECHILD and it will be called again in ref-walk mode.”…”�”}”(hjMh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M>hj.ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jºhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´M@hjb h²hubjš)�”}”(hŒy``setattr`` called by the VFS to set attributes for a file. This method is called by chmod(2) and related system calls. ”h]”(j )�”}”(hŒ ``setattr``”h]”j¦)�”}”(hjmh]”hŒsetattr”…”�”}”(hjoh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjkubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´MDhjgubj»)�”}”(hhh]”hÞ)�”}”(hŒlcalled by the VFS to set attributes for a file. This method is called by chmod(2) and related system calls.”h]”hŒlcalled by the VFS to set attributes for a file. This method is called by chmod(2) and related system calls.”…”�”}”(hj…h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MChj‚ubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhjgubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´MDhjb h²hubjš)�”}”(hŒw``getattr`` called by the VFS to get attributes of a file. This method is called by stat(2) and related system calls. ”h]”(j )�”}”(hŒ ``getattr``”h]”j¦)�”}”(hj¥h]”hŒgetattr”…”�”}”(hj§h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj£ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´MHhjŸubj»)�”}”(hhh]”hÞ)�”}”(hŒjcalled by the VFS to get attributes of a file. This method is called by stat(2) and related system calls.”h]”hŒjcalled by the VFS to get attributes of a file. This method is called by stat(2) and related system calls.”…”�”}”(hj½h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MGhjºubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhjŸubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´MHhjb h²hubjš)�”}”(hŒŠ``listxattr`` called by the VFS to list all extended attributes for a given file. This method is called by the listxattr(2) system call. ”h]”(j )�”}”(hŒ ``listxattr``”h]”j¦)�”}”(hjÝh]”hŒ listxattr”…”�”}”(hjßh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjÛubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´MLhj×ubj»)�”}”(hhh]”hÞ)�”}”(hŒ{called by the VFS to list all extended attributes for a given file. This method is called by the listxattr(2) system call.”h]”hŒ{called by the VFS to list all extended attributes for a given file. This method is called by the listxattr(2) system call.”…”�”}”(hjõh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MKhjòubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhj×ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´MLhjb h²hubjš)�”}”(hŒ·``update_time`` called by the VFS to update a specific time or the i_version of an inode. If this is not defined the VFS will update the inode itself and call mark_inode_dirty_sync. ”h]”(j )�”}”(hŒ``update_time``”h]”j¦)�”}”(hjh]”hŒ update_time”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´MQhjubj»)�”}”(hhh]”hÞ)�”}”(hŒ¦called by the VFS to update a specific time or the i_version of an inode. If this is not defined the VFS will update the inode itself and call mark_inode_dirty_sync.”h]”hŒ¦called by the VFS to update a specific time or the i_version of an inode. If this is not defined the VFS will update the inode itself and call mark_inode_dirty_sync.”…”�”}”(hj-h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MOhj*ubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´MQhjb h²hubjš)�”}”(hŒ–``sync_lazytime``: called by the writeback code to update the lazy time stamps to regular time stamp updates that get syncing into the on-disk inode. ”h]”(j )�”}”(hŒ``sync_lazytime``:”h]”(j¦)�”}”(hŒ``sync_lazytime``”h]”hŒ sync_lazytime”…”�”}”(hjOh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjKubhŒ:”…”�”}”(hjKh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´MVhjGubj»)�”}”(hhh]”hÞ)�”}”(hŒ‚called by the writeback code to update the lazy time stamps to regular time stamp updates that get syncing into the on-disk inode.”h]”hŒ‚called by the writeback code to update the lazy time stamps to regular time stamp updates that get syncing into the on-disk inode.”…”�”}”(hjjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MThjgubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhjGubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´MVhjb h²hubjš)�”}”(hXä``atomic_open`` called on the last component of an open. Using this optional method the filesystem can look up, possibly create and open the file in one atomic operation. If it wants to leave actual opening to the caller (e.g. if the file turned out to be a symlink, device, or just something filesystem won't do atomic open for), it may signal this by returning finish_no_open(file, dentry). This method is only called if the last component is negative or needs lookup. Cached positive dentries are still handled by f_op->open(). If the file was created, FMODE_CREATED flag should be set in file->f_mode. In case of O_EXCL the method must only succeed if the file didn't exist and hence FMODE_CREATED shall always be set on success. ”h]”(j )�”}”(hŒ``atomic_open``”h]”j¦)�”}”(hjŠh]”hŒ atomic_open”…”�”}”(hjŒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjˆubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´Mdhj„ubj»)�”}”(hhh]”hÞ)�”}”(hXÓcalled on the last component of an open. Using this optional method the filesystem can look up, possibly create and open the file in one atomic operation. If it wants to leave actual opening to the caller (e.g. if the file turned out to be a symlink, device, or just something filesystem won't do atomic open for), it may signal this by returning finish_no_open(file, dentry). This method is only called if the last component is negative or needs lookup. Cached positive dentries are still handled by f_op->open(). If the file was created, FMODE_CREATED flag should be set in file->f_mode. In case of O_EXCL the method must only succeed if the file didn't exist and hence FMODE_CREATED shall always be set on success.”h]”hX×called on the last component of an open. Using this optional method the filesystem can look up, possibly create and open the file in one atomic operation. If it wants to leave actual opening to the caller (e.g. if the file turned out to be a symlink, device, or just something filesystem won’t do atomic open for), it may signal this by returning finish_no_open(file, dentry). This method is only called if the last component is negative or needs lookup. Cached positive dentries are still handled by f_op->open(). If the file was created, FMODE_CREATED flag should be set in file->f_mode. In case of O_EXCL the method must only succeed if the file didn’t exist and hence FMODE_CREATED shall always be set on success.”…”�”}”(hj¢h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MYhjŸubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhj„ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´Mdhjb h²hubjš)�”}”(hX ``tmpfile`` called in the end of O_TMPFILE open(). Optional, equivalent to atomically creating, opening and unlinking a file in given directory. On success needs to return with the file already open; this can be done by calling finish_open_simple() right at the end. ”h]”(j )�”}”(hŒ ``tmpfile``”h]”j¦)�”}”(hjÂh]”hŒtmpfile”…”�”}”(hjÄh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjÀubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´Mkhj¼ubj»)�”}”(hhh]”hÞ)�”}”(hXcalled in the end of O_TMPFILE open(). Optional, equivalent to atomically creating, opening and unlinking a file in given directory. On success needs to return with the file already open; this can be done by calling finish_open_simple() right at the end.”h]”hXcalled in the end of O_TMPFILE open(). Optional, equivalent to atomically creating, opening and unlinking a file in given directory. On success needs to return with the file already open; this can be done by calling finish_open_simple() right at the end.”…”�”}”(hjÚh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Mghj×ubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhj¼ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´Mkhjb h²hubjš)�”}”(hX,``fileattr_get`` called on ioctl(FS_IOC_GETFLAGS) and ioctl(FS_IOC_FSGETXATTR) to retrieve miscellaneous file flags and attributes. Also called before the relevant SET operation to check what is being changed (in this case with i_rwsem locked exclusive). If unset, then fall back to f_op->ioctl(). ”h]”(j )�”}”(hŒ``fileattr_get``”h]”j¦)�”}”(hjúh]”hŒ fileattr_get”…”�”}”(hjüh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjøubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´Mrhjôubj»)�”}”(hhh]”hÞ)�”}”(hXcalled on ioctl(FS_IOC_GETFLAGS) and ioctl(FS_IOC_FSGETXATTR) to retrieve miscellaneous file flags and attributes. Also called before the relevant SET operation to check what is being changed (in this case with i_rwsem locked exclusive). If unset, then fall back to f_op->ioctl().”h]”hXcalled on ioctl(FS_IOC_GETFLAGS) and ioctl(FS_IOC_FSGETXATTR) to retrieve miscellaneous file flags and attributes. Also called before the relevant SET operation to check what is being changed (in this case with i_rwsem locked exclusive). If unset, then fall back to f_op->ioctl().”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Mnhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhjôubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´Mrhjb h²hubjš)�”}”(hŒÎ``fileattr_set`` called on ioctl(FS_IOC_SETFLAGS) and ioctl(FS_IOC_FSSETXATTR) to change miscellaneous file flags and attributes. Callers hold i_rwsem exclusive. If unset, then fall back to f_op->ioctl().”h]”(j )�”}”(hŒ``fileattr_set``”h]”j¦)�”}”(hj2h]”hŒ fileattr_set”…”�”}”(hj4h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj0ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´Mvhj,ubj»)�”}”(hhh]”hÞ)�”}”(hŒ½called on ioctl(FS_IOC_SETFLAGS) and ioctl(FS_IOC_FSSETXATTR) to change miscellaneous file flags and attributes. Callers hold i_rwsem exclusive. If unset, then fall back to f_op->ioctl().”h]”hŒ½called on ioctl(FS_IOC_SETFLAGS) and ioctl(FS_IOC_FSSETXATTR) to change miscellaneous file flags and attributes. Callers hold i_rwsem exclusive. If unset, then fall back to f_op->ioctl().”…”�”}”(hjJh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MuhjGubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhj,ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´Mvhjb h²hubjš)�”}”(hŒ˜``get_offset_ctx`` called to get the offset context for a directory inode. A filesystem must define this operation to use simple_offset_dir_operations. ”h]”(j )�”}”(hŒ``get_offset_ctx``”h]”j¦)�”}”(hjjh]”hŒget_offset_ctx”…”�”}”(hjlh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjhubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M{hjdubj»)�”}”(hhh]”hÞ)�”}”(hŒ„called to get the offset context for a directory inode. A filesystem must define this operation to use simple_offset_dir_operations.”h]”hŒ„called to get the offset context for a directory inode. A filesystem must define this operation to use simple_offset_dir_operations.”…”�”}”(hj‚h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Myhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhjdubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´M{hjb h²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1j”hj& h²hh³hÇh´Nubeh}”(h]”Œstruct-inode-operations”ah ]”h"]”Œstruct inode_operations”ah$]”h&]”uh1hÈhj h²hh³hÇh´Mšubeh}”(h]”Œid1”ah ]”h"]”h$]”j×ah&]”uh1hÈhhÊh²hh³hÇh´M”j£KubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒThe Address Space Object”h]”hŒThe Address Space Object”…”�”}”(hj´h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj±h²hh³hÇh´M~ubhÞ)�”}”(hŒåThe address space object is used to group and manage pages in the page cache. It can be used to keep track of the pages in a file (or anything else) and also track the mapping of sections of the file into process address spaces.”h]”hŒåThe address space object is used to group and manage pages in the page cache. It can be used to keep track of the pages in a file (or anything else) and also track the mapping of sections of the file into process address spaces.”…”�”}”(hjÂh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M€hj±h²hubhÞ)�”}”(hŒÕThere are a number of distinct yet related services that an address-space can provide. These include communicating memory pressure, page lookup by address, and keeping track of pages tagged as Dirty or Writeback.”h]”hŒÕThere are a number of distinct yet related services that an address-space can provide. These include communicating memory pressure, page lookup by address, and keeping track of pages tagged as Dirty or Writeback.”…”�”}”(hjÐh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M…hj±h²hubhÞ)�”}”(hXGThe first can be used independently to the others. The VM can try to release clean pages in order to reuse them. To do this it can call ->release_folio on clean folios with the private flag set. Clean pages without PagePrivate and with no external references will be released without notice being given to the address_space.”h]”hXGThe first can be used independently to the others. The VM can try to release clean pages in order to reuse them. To do this it can call ->release_folio on clean folios with the private flag set. Clean pages without PagePrivate and with no external references will be released without notice being given to the address_space.”…”�”}”(hjÞh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MŠhj±h²hubhÞ)�”}”(hŒ–To achieve this functionality, pages need to be placed on an LRU with lru_cache_add and mark_page_active needs to be called whenever the page is used.”h]”hŒ–To achieve this functionality, pages need to be placed on an LRU with lru_cache_add and mark_page_active needs to be called whenever the page is used.”…”�”}”(hjìh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M�hj±h²hubhÞ)�”}”(hŒÒPages are normally kept in a radix tree index by ->index. This tree maintains information about the PG_Dirty and PG_Writeback status of each page, so that pages with either of these flags can be found quickly.”h]”hŒÒPages are normally kept in a radix tree index by ->index. This tree maintains information about the PG_Dirty and PG_Writeback status of each page, so that pages with either of these flags can be found quickly.”…”�”}”(hjúh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M”hj±h²hubhÞ)�”}”(hX©The Dirty tag is primarily used by mpage_writepages - the default ->writepages method. It uses the tag to find dirty pages to write back. If mpage_writepages is not used (i.e. the address provides its own ->writepages) , the PAGECACHE_TAG_DIRTY tag is almost unused. write_inode_now and sync_inode do use it (through __sync_single_inode) to check if ->writepages has been successful in writing out the whole address_space.”h]”hX©The Dirty tag is primarily used by mpage_writepages - the default ->writepages method. It uses the tag to find dirty pages to write back. If mpage_writepages is not used (i.e. the address provides its own ->writepages) , the PAGECACHE_TAG_DIRTY tag is almost unused. write_inode_now and sync_inode do use it (through __sync_single_inode) to check if ->writepages has been successful in writing out the whole address_space.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M˜hj±h²hubhÞ)�”}”(hŒˆThe Writeback tag is used by filemap*wait* and sync_page* functions, via filemap_fdatawait_range, to wait for all writeback to complete.”h]”hŒˆThe Writeback tag is used by filemap*wait* and sync_page* functions, via filemap_fdatawait_range, to wait for all writeback to complete.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M hj±h²hubhÞ)�”}”(hX/An address_space handler may attach extra information to a page, typically using the 'private' field in the 'struct page'. If such information is attached, the PG_Private flag should be set. This will cause various VM routines to make extra calls into the address_space handler to deal with that data.”h]”hX7An address_space handler may attach extra information to a page, typically using the ‘private’ field in the ‘struct page’. If such information is attached, the PG_Private flag should be set. This will cause various VM routines to make extra calls into the address_space handler to deal with that data.”…”�”}”(hj$h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M£hj±h²hubhÞ)�”}”(hX—An address space acts as an intermediate between storage and application. Data is read into the address space a whole page at a time, and provided to the application either by copying of the page, or by memory-mapping the page. Data is written into the address space by the application, and then written-back to storage typically in whole pages, however the address_space has finer control of write sizes.”h]”hX—An address space acts as an intermediate between storage and application. Data is read into the address space a whole page at a time, and provided to the application either by copying of the page, or by memory-mapping the page. Data is written into the address space by the application, and then written-back to storage typically in whole pages, however the address_space has finer control of write sizes.”…”�”}”(hj2h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M©hj±h²hubhÞ)�”}”(hŒàThe read process essentially only requires 'read_folio'. The write process is more complicated and uses write_begin/write_end or dirty_folio to write data into the address_space, and writepages to writeback data to storage.”h]”hŒäThe read process essentially only requires ‘read_folio’. The write process is more complicated and uses write_begin/write_end or dirty_folio to write data into the address_space, and writepages to writeback data to storage.”…”�”}”(hj@h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M°hj±h²hubhÞ)�”}”(hŒÃRemoving pages from an address_space requires holding the inode's i_rwsem exclusively, while adding pages to the address_space requires holding the inode's i_mapping->invalidate_lock exclusively.”h]”hŒÇRemoving pages from an address_space requires holding the inode’s i_rwsem exclusively, while adding pages to the address_space requires holding the inode’s i_mapping->invalidate_lock exclusively.”…”�”}”(hjNh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Mµhj±h²hubhÞ)�”}”(hX1When data is written to a page, the PG_Dirty flag should be set. It typically remains set until writepages asks for it to be written. This should clear PG_Dirty and set PG_Writeback. It can be actually written at any point after PG_Dirty is clear. Once it is known to be safe, PG_Writeback is cleared.”h]”hX1When data is written to a page, the PG_Dirty flag should be set. It typically remains set until writepages asks for it to be written. This should clear PG_Dirty and set PG_Writeback. It can be actually written at any point after PG_Dirty is clear. Once it is known to be safe, PG_Writeback is cleared.”…”�”}”(hj\h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M¹hj±h²hubhÞ)�”}”(hXTWriteback makes use of a writeback_control structure to direct the operations. This gives the writepages operation some information about the nature of and reason for the writeback request, and the constraints under which it is being done. It is also used to return information back to the caller about the result of a writepages request.”h]”hXTWriteback makes use of a writeback_control structure to direct the operations. This gives the writepages operation some information about the nature of and reason for the writeback request, and the constraints under which it is being done. It is also used to return information back to the caller about the result of a writepages request.”…”�”}”(hjjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M¿hj±h²hubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ Handling errors during writeback”h]”hŒ Handling errors during writeback”…”�”}”(hj{h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjxh²hh³hÇh´MÈubhÞ)�”}”(hXMost applications that do buffered I/O will periodically call a file synchronization call (fsync, fdatasync, msync or sync_file_range) to ensure that data written has made it to the backing store. When there is an error during writeback, they expect that error to be reported when a file sync request is made. After an error has been reported on one request, subsequent requests on the same file descriptor should return 0, unless further writeback errors have occurred since the previous file synchronization.”h]”hXMost applications that do buffered I/O will periodically call a file synchronization call (fsync, fdatasync, msync or sync_file_range) to ensure that data written has made it to the backing store. When there is an error during writeback, they expect that error to be reported when a file sync request is made. After an error has been reported on one request, subsequent requests on the same file descriptor should return 0, unless further writeback errors have occurred since the previous file synchronization.”…”�”}”(hj‰h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MÊhjxh²hubhÞ)�”}”(hXSIdeally, the kernel would report errors only on file descriptions on which writes were done that subsequently failed to be written back. The generic pagecache infrastructure does not track the file descriptions that have dirtied each individual page however, so determining which file descriptors should get back an error is not possible.”h]”hXSIdeally, the kernel would report errors only on file descriptions on which writes were done that subsequently failed to be written back. The generic pagecache infrastructure does not track the file descriptions that have dirtied each individual page however, so determining which file descriptors should get back an error is not possible.”…”�”}”(hj—h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MÓhjxh²hubhÞ)�”}”(hX±Instead, the generic writeback error tracking infrastructure in the kernel settles for reporting errors to fsync on all file descriptions that were open at the time that the error occurred. In a situation with multiple writers, all of them will get back an error on a subsequent fsync, even if all of the writes done through that particular file descriptor succeeded (or even if there were no writes on that file descriptor at all).”h]”hX±Instead, the generic writeback error tracking infrastructure in the kernel settles for reporting errors to fsync on all file descriptions that were open at the time that the error occurred. In a situation with multiple writers, all of them will get back an error on a subsequent fsync, even if all of the writes done through that particular file descriptor succeeded (or even if there were no writes on that file descriptor at all).”…”�”}”(hj¥h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MÙhjxh²hubhÞ)�”}”(hX’Filesystems that wish to use this infrastructure should call mapping_set_error to record the error in the address_space when it occurs. Then, after writing back data from the pagecache in their file->fsync operation, they should call file_check_and_advance_wb_err to ensure that the struct file's error cursor has advanced to the correct point in the stream of errors emitted by the backing device(s).”h]”hX”Filesystems that wish to use this infrastructure should call mapping_set_error to record the error in the address_space when it occurs. Then, after writing back data from the pagecache in their file->fsync operation, they should call file_check_and_advance_wb_err to ensure that the struct file’s error cursor has advanced to the correct point in the stream of errors emitted by the backing device(s).”…”�”}”(hj³h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Máhjxh²hubeh}”(h]”Œ handling-errors-during-writeback”ah ]”h"]”Œ handling errors during writeback”ah$]”h&]”uh1hÈhj±h²hh³hÇh´MÈubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒstruct address_space_operations”h]”hŒstruct address_space_operations”…”�”}”(hjÌh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjÉh²hh³hÇh´MêubhÞ)�”}”(hŒ�This describes how the VFS can manipulate mapping of a file to page cache in your filesystem. The following members are defined:”h]”hŒ�This describes how the VFS can manipulate mapping of a file to page cache in your filesystem. The following members are defined:”…”�”}”(hjÚh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MìhjÉh²hubj6)�”}”(hX2struct address_space_operations { int (*read_folio)(struct file *, struct folio *); int (*writepages)(struct address_space *, struct writeback_control *); bool (*dirty_folio)(struct address_space *, struct folio *); void (*readahead)(struct readahead_control *); int (*write_begin)(const struct kiocb *, struct address_space *mapping, loff_t pos, unsigned len, struct page **pagep, void **fsdata); int (*write_end)(const struct kiocb *, struct address_space *mapping, loff_t pos, unsigned len, unsigned copied, struct folio *folio, void *fsdata); sector_t (*bmap)(struct address_space *, sector_t); void (*invalidate_folio) (struct folio *, size_t start, size_t len); bool (*release_folio)(struct folio *, gfp_t); void (*free_folio)(struct folio *); ssize_t (*direct_IO)(struct kiocb *, struct iov_iter *iter); int (*migrate_folio)(struct mapping *, struct folio *dst, struct folio *src, enum migrate_mode); int (*launder_folio) (struct folio *); bool (*is_partially_uptodate) (struct folio *, size_t from, size_t count); void (*is_dirty_writeback)(struct folio *, bool *, bool *); int (*error_remove_folio)(struct mapping *mapping, struct folio *); int (*swap_activate)(struct swap_info_struct *sis, struct file *f, sector_t *span) int (*swap_deactivate)(struct file *); };”h]”hX2struct address_space_operations { int (*read_folio)(struct file *, struct folio *); int (*writepages)(struct address_space *, struct writeback_control *); bool (*dirty_folio)(struct address_space *, struct folio *); void (*readahead)(struct readahead_control *); int (*write_begin)(const struct kiocb *, struct address_space *mapping, loff_t pos, unsigned len, struct page **pagep, void **fsdata); int (*write_end)(const struct kiocb *, struct address_space *mapping, loff_t pos, unsigned len, unsigned copied, struct folio *folio, void *fsdata); sector_t (*bmap)(struct address_space *, sector_t); void (*invalidate_folio) (struct folio *, size_t start, size_t len); bool (*release_folio)(struct folio *, gfp_t); void (*free_folio)(struct folio *); ssize_t (*direct_IO)(struct kiocb *, struct iov_iter *iter); int (*migrate_folio)(struct mapping *, struct folio *dst, struct folio *src, enum migrate_mode); int (*launder_folio) (struct folio *); bool (*is_partially_uptodate) (struct folio *, size_t from, size_t count); void (*is_dirty_writeback)(struct folio *, bool *, bool *); int (*error_remove_folio)(struct mapping *mapping, struct folio *); int (*swap_activate)(struct swap_info_struct *sis, struct file *f, sector_t *span) int (*swap_deactivate)(struct file *); };”…”�”}”hjèsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆjE‰jFjGjH}”uh1j5h³hÇh´MïhjÉh²hubj•)�”}”(hhh]”(jš)�”}”(hXŽ``read_folio`` Called by the page cache to read a folio from the backing store. The 'file' argument supplies authentication information to network filesystems, and is generally not used by block based filesystems. It may be NULL if the caller does not have an open file (eg if the kernel is performing a read for itself rather than on behalf of a userspace process with an open file). If the mapping does not support large folios, the folio will contain a single page. The folio will be locked when read_folio is called. If the read completes successfully, the folio should be marked uptodate. The filesystem should unlock the folio once the read has completed, whether it was successful or not. The filesystem does not need to modify the refcount on the folio; the page cache holds a reference count and that will not be released until the folio is unlocked. Filesystems may implement ->read_folio() synchronously. In normal operation, folios are read through the ->readahead() method. Only if this fails, or if the caller needs to wait for the read to complete will the page cache call ->read_folio(). Filesystems should not attempt to perform their own readahead in the ->read_folio() operation. If the filesystem cannot perform the read at this time, it can unlock the folio, do whatever action it needs to ensure that the read will succeed in the future and return AOP_TRUNCATED_PAGE. In this case, the caller should look up the folio, lock it, and call ->read_folio again. Callers may invoke the ->read_folio() method directly, but using read_mapping_folio() will take care of locking, waiting for the read to complete and handle cases such as AOP_TRUNCATED_PAGE. ”h]”(j )�”}”(hŒ``read_folio``”h]”j¦)�”}”(hjh]”hŒ read_folio”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjþubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M-hjúubj»)�”}”(hhh]”(hÞ)�”}”(hXqCalled by the page cache to read a folio from the backing store. The 'file' argument supplies authentication information to network filesystems, and is generally not used by block based filesystems. It may be NULL if the caller does not have an open file (eg if the kernel is performing a read for itself rather than on behalf of a userspace process with an open file).”h]”hXuCalled by the page cache to read a folio from the backing store. The ‘file’ argument supplies authentication information to network filesystems, and is generally not used by block based filesystems. It may be NULL if the caller does not have an open file (eg if the kernel is performing a read for itself rather than on behalf of a userspace process with an open file).”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MhjubhÞ)�”}”(hXÝIf the mapping does not support large folios, the folio will contain a single page. The folio will be locked when read_folio is called. If the read completes successfully, the folio should be marked uptodate. The filesystem should unlock the folio once the read has completed, whether it was successful or not. The filesystem does not need to modify the refcount on the folio; the page cache holds a reference count and that will not be released until the folio is unlocked.”h]”hXÝIf the mapping does not support large folios, the folio will contain a single page. The folio will be locked when read_folio is called. If the read completes successfully, the folio should be marked uptodate. The filesystem should unlock the folio once the read has completed, whether it was successful or not. The filesystem does not need to modify the refcount on the folio; the page cache holds a reference count and that will not be released until the folio is unlocked.”…”�”}”(hj&h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MhjubhÞ)�”}”(hXSFilesystems may implement ->read_folio() synchronously. In normal operation, folios are read through the ->readahead() method. Only if this fails, or if the caller needs to wait for the read to complete will the page cache call ->read_folio(). Filesystems should not attempt to perform their own readahead in the ->read_folio() operation.”h]”hXSFilesystems may implement ->read_folio() synchronously. In normal operation, folios are read through the ->readahead() method. Only if this fails, or if the caller needs to wait for the read to complete will the page cache call ->read_folio(). Filesystems should not attempt to perform their own readahead in the ->read_folio() operation.”…”�”}”(hj4h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MhjubhÞ)�”}”(hXIf the filesystem cannot perform the read at this time, it can unlock the folio, do whatever action it needs to ensure that the read will succeed in the future and return AOP_TRUNCATED_PAGE. In this case, the caller should look up the folio, lock it, and call ->read_folio again.”h]”hXIf the filesystem cannot perform the read at this time, it can unlock the folio, do whatever action it needs to ensure that the read will succeed in the future and return AOP_TRUNCATED_PAGE. In this case, the caller should look up the folio, lock it, and call ->read_folio again.”…”�”}”(hjBh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M%hjubhÞ)�”}”(hŒ¾Callers may invoke the ->read_folio() method directly, but using read_mapping_folio() will take care of locking, waiting for the read to complete and handle cases such as AOP_TRUNCATED_PAGE.”h]”hŒ¾Callers may invoke the ->read_folio() method directly, but using read_mapping_folio() will take care of locking, waiting for the read to complete and handle cases such as AOP_TRUNCATED_PAGE.”…”�”}”(hjPh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M+hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jºhjúubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´M-hj÷ubjš)�”}”(hXà``writepages`` called by the VM to write out pages associated with the address_space object. If wbc->sync_mode is WB_SYNC_ALL, then the writeback_control will specify a range of pages that must be written out. If it is WB_SYNC_NONE, then a nr_to_write is given and that many pages should be written if possible. If no ->writepages is given, then mpage_writepages is used instead. This will choose pages from the address space that are tagged as DIRTY and will write them back. ”h]”(j )�”}”(hŒ``writepages``”h]”j¦)�”}”(hjph]”hŒ writepages”…”�”}”(hjrh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjnubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M7hjjubj»)�”}”(hhh]”hÞ)�”}”(hXÐcalled by the VM to write out pages associated with the address_space object. If wbc->sync_mode is WB_SYNC_ALL, then the writeback_control will specify a range of pages that must be written out. If it is WB_SYNC_NONE, then a nr_to_write is given and that many pages should be written if possible. If no ->writepages is given, then mpage_writepages is used instead. This will choose pages from the address space that are tagged as DIRTY and will write them back.”h]”hXÐcalled by the VM to write out pages associated with the address_space object. If wbc->sync_mode is WB_SYNC_ALL, then the writeback_control will specify a range of pages that must be written out. If it is WB_SYNC_NONE, then a nr_to_write is given and that many pages should be written if possible. If no ->writepages is given, then mpage_writepages is used instead. This will choose pages from the address space that are tagged as DIRTY and will write them back.”…”�”}”(hjˆh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M0hj…ubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhjjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´M7hj÷h²hubjš)�”}”(hXt``dirty_folio`` called by the VM to mark a folio as dirty. This is particularly needed if an address space attaches private data to a folio, and that data needs to be updated when a folio is dirtied. This is called, for example, when a memory mapped page gets modified. If defined, it should set the folio dirty flag, and the PAGECACHE_TAG_DIRTY search mark in i_pages. ”h]”(j )�”}”(hŒ``dirty_folio``”h]”j¦)�”}”(hj¨h]”hŒ dirty_folio”…”�”}”(hjªh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj¦ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M?hj¢ubj»)�”}”(hhh]”hÞ)�”}”(hXccalled by the VM to mark a folio as dirty. This is particularly needed if an address space attaches private data to a folio, and that data needs to be updated when a folio is dirtied. This is called, for example, when a memory mapped page gets modified. If defined, it should set the folio dirty flag, and the PAGECACHE_TAG_DIRTY search mark in i_pages.”h]”hXccalled by the VM to mark a folio as dirty. This is particularly needed if an address space attaches private data to a folio, and that data needs to be updated when a folio is dirtied. This is called, for example, when a memory mapped page gets modified. If defined, it should set the folio dirty flag, and the PAGECACHE_TAG_DIRTY search mark in i_pages.”…”�”}”(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™h³hÇh´M?hj÷h²hubjš)�”}”(hX ``readahead`` Called by the VM to read pages associated with the address_space object. The pages are consecutive in the page cache and are locked. The implementation should decrement the page refcount after starting I/O on each page. Usually the page will be unlocked by the I/O completion handler. The set of pages are divided into some sync pages followed by some async pages, rac->ra->async_size gives the number of async pages. The filesystem should attempt to read all sync pages but may decide to stop once it reaches the async pages. If it does decide to stop attempting I/O, it can simply return. The caller will remove the remaining pages from the address space, unlock them and decrement the page refcount. Set PageUptodate if the I/O completes successfully. ”h]”(j )�”}”(hŒ ``readahead``”h]”j¦)�”}”(hjàh]”hŒ readahead”…”�”}”(hjâh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjÞubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´MNhjÚubj»)�”}”(hhh]”hÞ)�”}”(hXúCalled by the VM to read pages associated with the address_space object. The pages are consecutive in the page cache and are locked. The implementation should decrement the page refcount after starting I/O on each page. Usually the page will be unlocked by the I/O completion handler. The set of pages are divided into some sync pages followed by some async pages, rac->ra->async_size gives the number of async pages. The filesystem should attempt to read all sync pages but may decide to stop once it reaches the async pages. If it does decide to stop attempting I/O, it can simply return. The caller will remove the remaining pages from the address space, unlock them and decrement the page refcount. Set PageUptodate if the I/O completes successfully.”h]”hXúCalled by the VM to read pages associated with the address_space object. The pages are consecutive in the page cache and are locked. The implementation should decrement the page refcount after starting I/O on each page. Usually the page will be unlocked by the I/O completion handler. The set of pages are divided into some sync pages followed by some async pages, rac->ra->async_size gives the number of async pages. The filesystem should attempt to read all sync pages but may decide to stop once it reaches the async pages. If it does decide to stop attempting I/O, it can simply return. The caller will remove the remaining pages from the address space, unlock them and decrement the page refcount. Set PageUptodate if the I/O completes successfully.”…”�”}”(hjøh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MBhjõubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhjÚubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´MNhj÷h²hubjš)�”}”(hX¦``write_begin`` Called by the generic buffered write code to ask the filesystem to prepare to write len bytes at the given offset in the file. The address_space should check that the write will be able to complete, by allocating space if necessary and doing any other internal housekeeping. If the write will update parts of any basic-blocks on storage, then those blocks should be pre-read (if they haven't been read already) so that the updated blocks can be written out properly. The filesystem must return the locked pagecache folio for the specified offset, in ``*foliop``, for the caller to write into. It must be able to cope with short writes (where the length passed to write_begin is greater than the number of bytes copied into the folio). A void * may be returned in fsdata, which then gets passed into write_end. Returns 0 on success; < 0 on failure (which is the error code), in which case write_end is not called. ”h]”(j )�”}”(hŒ``write_begin``”h]”j¦)�”}”(hjh]”hŒ write_begin”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´Mehjubj»)�”}”(hhh]”(hÞ)�”}”(hXÓCalled by the generic buffered write code to ask the filesystem to prepare to write len bytes at the given offset in the file. The address_space should check that the write will be able to complete, by allocating space if necessary and doing any other internal housekeeping. If the write will update parts of any basic-blocks on storage, then those blocks should be pre-read (if they haven't been read already) so that the updated blocks can be written out properly.”h]”hXÕCalled by the generic buffered write code to ask the filesystem to prepare to write len bytes at the given offset in the file. The address_space should check that the write will be able to complete, by allocating space if necessary and doing any other internal housekeeping. If the write will update parts of any basic-blocks on storage, then those blocks should be pre-read (if they haven’t been read already) so that the updated blocks can be written out properly.”…”�”}”(hj0h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MQhj-ubhÞ)�”}”(hŒ}The filesystem must return the locked pagecache folio for the specified offset, in ``*foliop``, for the caller to write into.”h]”(hŒSThe filesystem must return the locked pagecache folio for the specified offset, in ”…”�”}”(hj>h²hh³Nh´Nubj¦)�”}”(hŒ ``*foliop``”h]”hŒ*foliop”…”�”}”(hjFh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj>ubhŒ, for the caller to write into.”…”�”}”(hj>h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MZhj-ubhÞ)�”}”(hŒ�It must be able to cope with short writes (where the length passed to write_begin is greater than the number of bytes copied into the folio).”h]”hŒ�It must be able to cope with short writes (where the length passed to write_begin is greater than the number of bytes copied into the folio).”…”�”}”(hj^h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M]hj-ubhÞ)�”}”(hŒJA void * may be returned in fsdata, which then gets passed into write_end.”h]”hŒJA void * may be returned in fsdata, which then gets passed into write_end.”…”�”}”(hjlh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Mahj-ubhÞ)�”}”(hŒfReturns 0 on success; < 0 on failure (which is the error code), in which case write_end is not called.”h]”hŒfReturns 0 on success; < 0 on failure (which is the error code), in which case write_end is not called.”…”�”}”(hjzh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Mdhj-ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jºhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´Mehj÷h²hubjš)�”}”(hX”``write_end`` After a successful write_begin, and data copy, write_end must be called. len is the original len passed to write_begin, and copied is the amount that was able to be copied. The filesystem must take care of unlocking the folio, decrementing its refcount, and updating i_size. Returns < 0 on failure, otherwise the number of bytes (<= 'copied') that were able to be copied into pagecache. ”h]”(j )�”}”(hŒ ``write_end``”h]”j¦)�”}”(hjšh]”hŒ write_end”…”�”}”(hjœh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj˜ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´Mphj”ubj»)�”}”(hhh]”(hÞ)�”}”(hŒ­After a successful write_begin, and data copy, write_end must be called. len is the original len passed to write_begin, and copied is the amount that was able to be copied.”h]”hŒ­After a successful write_begin, and data copy, write_end must be called. len is the original len passed to write_begin, and copied is the amount that was able to be copied.”…”�”}”(hj²h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Mhhj¯ubhÞ)�”}”(hŒeThe filesystem must take care of unlocking the folio, decrementing its refcount, and updating i_size.”h]”hŒeThe filesystem must take care of unlocking the folio, decrementing its refcount, and updating i_size.”…”�”}”(hjÀh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Mlhj¯ubhÞ)�”}”(hŒoReturns < 0 on failure, otherwise the number of bytes (<= 'copied') that were able to be copied into pagecache.”h]”hŒsReturns < 0 on failure, otherwise the number of bytes (<= ‘copied’) that were able to be copied into pagecache.”…”�”}”(hjÎh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Mohj¯ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jºhj”ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´Mphj÷h²hubjš)�”}”(hX›``bmap`` called by the VFS to map a logical block offset within object to physical block number. This method is used by the FIBMAP ioctl and for working with swap-files. To be able to swap to a file, the file must have a stable mapping to a block device. The swap system does not go through the filesystem but instead uses bmap to find out where the blocks in the file are and uses those addresses directly. ”h]”(j )�”}”(hŒ``bmap``”h]”j¦)�”}”(hjîh]”hŒbmap”…”�”}”(hjðh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”•>h&]”uh1j¥hjìubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´Myhjèubj»)�”}”(hhh]”hÞ)�”}”(hX‘called by the VFS to map a logical block offset within object to physical block number. This method is used by the FIBMAP ioctl and for working with swap-files. To be able to swap to a file, the file must have a stable mapping to a block device. The swap system does not go through the filesystem but instead uses bmap to find out where the blocks in the file are and uses those addresses directly.”h]”hX‘called by the VFS to map a logical block offset within object to physical block number. This method is used by the FIBMAP ioctl and for working with swap-files. To be able to swap to a file, the file must have a stable mapping to a block device. The swap system does not go through the filesystem but instead uses bmap to find out where the blocks in the file are and uses those addresses directly.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Mshjubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhjèubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´Myhj÷h²hubjš)�”}”(hX°``invalidate_folio`` If a folio has private data, then invalidate_folio will be called when part or all of the folio is to be removed from the address space. This generally corresponds to either a truncation, punch hole or a complete invalidation of the address space (in the latter case 'offset' will always be 0 and 'length' will be folio_size()). Any private data associated with the folio should be updated to reflect this truncation. If offset is 0 and length is folio_size(), then the private data should be released, because the folio must be able to be completely discarded. This may be done by calling the ->release_folio function, but in this case the release MUST succeed. ”h]”(j )�”}”(hŒ``invalidate_folio``”h]”j¦)�”}”(hj&h]”hŒinvalidate_folio”…”�”}”(hj(h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj$ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M†hj ubj»)�”}”(hhh]”hÞ)�”}”(hXšIf a folio has private data, then invalidate_folio will be called when part or all of the folio is to be removed from the address space. This generally corresponds to either a truncation, punch hole or a complete invalidation of the address space (in the latter case 'offset' will always be 0 and 'length' will be folio_size()). Any private data associated with the folio should be updated to reflect this truncation. If offset is 0 and length is folio_size(), then the private data should be released, because the folio must be able to be completely discarded. This may be done by calling the ->release_folio function, but in this case the release MUST succeed.”h]”hX¢If a folio has private data, then invalidate_folio will be called when part or all of the folio is to be removed from the address space. This generally corresponds to either a truncation, punch hole or a complete invalidation of the address space (in the latter case ‘offset’ will always be 0 and ‘length’ will be folio_size()). Any private data associated with the folio should be updated to reflect this truncation. If offset is 0 and length is folio_size(), then the private data should be released, because the folio must be able to be completely discarded. This may be done by calling the ->release_folio function, but in this case the release MUST succeed.”…”�”}”(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™h³hÇh´M†hj÷h²hubjš)�”}”(hX#``release_folio`` release_folio is called on folios with private data to tell the filesystem that the folio is about to be freed. ->release_folio should remove any private data from the folio and clear the private flag. If release_folio() fails, it should return false. release_folio() is used in two distinct though related cases. The first is when the VM wants to free a clean folio with no active users. If ->release_folio succeeds, the folio will be removed from the address_space and be freed. The second case is when a request has been made to invalidate some or all folios in an address_space. This can happen through the fadvise(POSIX_FADV_DONTNEED) system call or by the filesystem explicitly requesting it as nfs and 9p do (when they believe the cache may be out of date with storage) by calling invalidate_inode_pages2(). If the filesystem makes such a call, and needs to be certain that all folios are invalidated, then its release_folio will need to ensure this. Possibly it can clear the uptodate flag if it cannot free private data yet. ”h]”(j )�”}”(hŒ``release_folio``”h]”j¦)�”}”(hj^h]”hŒ release_folio”…”�”}”(hj`h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj\ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´MšhjXubj»)�”}”(hhh]”(hÞ)�”}”(hXãrelease_folio is called on folios with private data to tell the filesystem that the folio is about to be freed. ->release_folio should remove any private data from the folio and clear the private flag. If release_folio() fails, it should return false. release_folio() is used in two distinct though related cases. The first is when the VM wants to free a clean folio with no active users. If ->release_folio succeeds, the folio will be removed from the address_space and be freed.”h]”hXãrelease_folio is called on folios with private data to tell the filesystem that the folio is about to be freed. ->release_folio should remove any private data from the folio and clear the private flag. If release_folio() fails, it should return false. release_folio() is used in two distinct though related cases. The first is when the VM wants to free a clean folio with no active users. If ->release_folio succeeds, the folio will be removed from the address_space and be freed.”…”�”}”(hjvh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M‰hjsubhÞ)�”}”(hX+The second case is when a request has been made to invalidate some or all folios in an address_space. This can happen through the fadvise(POSIX_FADV_DONTNEED) system call or by the filesystem explicitly requesting it as nfs and 9p do (when they believe the cache may be out of date with storage) by calling invalidate_inode_pages2(). If the filesystem makes such a call, and needs to be certain that all folios are invalidated, then its release_folio will need to ensure this. Possibly it can clear the uptodate flag if it cannot free private data yet.”h]”hX+The second case is when a request has been made to invalidate some or all folios in an address_space. This can happen through the fadvise(POSIX_FADV_DONTNEED) system call or by the filesystem explicitly requesting it as nfs and 9p do (when they believe the cache may be out of date with storage) by calling invalidate_inode_pages2(). If the filesystem makes such a call, and needs to be certain that all folios are invalidated, then its release_folio will need to ensure this. Possibly it can clear the uptodate flag if it cannot free private data yet.”…”�”}”(hj„h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M’hjsubeh}”(h]”h ]”h"]”h$]”h&]”uh1jºhjXubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´Mšhj÷h²hubjš)�”}”(hX!``free_folio`` free_folio is called once the folio is no longer visible in the page cache in order to allow the cleanup of any private data. Since it may be called by the memory reclaimer, it should not assume that the original address_space mapping still exists, and it should not block. ”h]”(j )�”}”(hŒ``free_folio``”h]”j¦)�”}”(hj¤h]”hŒ free_folio”…”�”}”(hj¦h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj¢ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M¡hjžubj»)�”}”(hhh]”hÞ)�”}”(hXfree_folio is called once the folio is no longer visible in the page cache in order to allow the cleanup of any private data. Since it may be called by the memory reclaimer, it should not assume that the original address_space mapping still exists, and it should not block.”h]”hXfree_folio is called once the folio is no longer visible in the page cache in order to allow the cleanup of any private data. Since it may be called by the memory reclaimer, it should not assume that the original address_space mapping still exists, and it should not block.”…”�”}”(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™h³hÇh´M¡hj÷h²hubjš)�”}”(hŒÓ``direct_IO`` called by the generic read/write routines to perform direct_IO - that is IO requests which bypass the page cache and transfer data directly between the storage and the application's address space. ”h]”(j )�”}”(hŒ ``direct_IO``”h]”j¦)�”}”(hjÜh]”hŒ direct_IO”…”�”}”(hjÞh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjÚubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M§hjÖubj»)�”}”(hhh]”hÞ)�”}”(hŒÄcalled by the generic read/write routines to perform direct_IO - that is IO requests which bypass the page cache and transfer data directly between the storage and the application's address space.”h]”hŒÆcalled by the generic read/write routines to perform direct_IO - that is IO requests which bypass the page cache and transfer data directly between the storage and the application’s address space.”…”�”}”(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™h³hÇh´M§hj÷h²hubjš)�”}”(hXR``migrate_folio`` This is used to compact the physical memory usage. If the VM wants to relocate a folio (maybe from a memory device that is signalling imminent failure) it will pass a new folio and an old folio to this function. migrate_folio should transfer any private data across and update any references that it has to the folio. ”h]”(j )�”}”(hŒ``migrate_folio``”h]”j¦)�”}”(hjh]”hŒ migrate_folio”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M®hjubj»)�”}”(hhh]”hÞ)�”}”(hX?This is used to compact the physical memory usage. If the VM wants to relocate a folio (maybe from a memory device that is signalling imminent failure) it will pass a new folio and an old folio to this function. migrate_folio should transfer any private data across and update any references that it has to the folio.”h]”hX?This is used to compact the physical memory usage. If the VM wants to relocate a folio (maybe from a memory device that is signalling imminent failure) it will pass a new folio and an old folio to this function. migrate_folio should transfer any private data across and update any references that it has to the folio.”…”�”}”(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™h³hÇh´M®hj÷h²hubjš)�”}”(hŒ¡``launder_folio`` Called before freeing a folio - it writes back the dirty folio. To prevent redirtying the folio, it is kept locked during the whole operation. ”h]”(j )�”}”(hŒ``launder_folio``”h]”j¦)�”}”(hjLh]”hŒ launder_folio”…”�”}”(hjNh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjJubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M³hjFubj»)�”}”(hhh]”hÞ)�”}”(hŒŽCalled before freeing a folio - it writes back the dirty folio. To prevent redirtying the folio, it is kept locked during the whole operation.”h]”hŒŽCalled before freeing a folio - it writes back the dirty folio. To prevent redirtying the folio, it is kept locked during the whole operation.”…”�”}”(hjdh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M±hjaubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhjFubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´M³hj÷h²hubjš)�”}”(hX``is_partially_uptodate`` Called by the VM when reading a file through the pagecache when the underlying blocksize is smaller than the size of the folio. If the required block is up to date then the read can complete without needing I/O to bring the whole page up to date. ”h]”(j )�”}”(hŒ``is_partially_uptodate``”h]”j¦)�”}”(hj„h]”hŒis_partially_uptodate”…”�”}”(hj†h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj‚ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M¹hj~ubj»)�”}”(hhh]”hÞ)�”}”(hŒöCalled by the VM when reading a file through the pagecache when the underlying blocksize is smaller than the size of the folio. If the required block is up to date then the read can complete without needing I/O to bring the whole page up to date.”h]”hŒöCalled by the VM when reading a file through the pagecache when the underlying blocksize is smaller than the size of the folio. If the required block is up to date then the read can complete without needing I/O to bring the whole page up to date.”…”�”}”(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™h³hÇh´M¹hj÷h²hubjš)�”}”(hX``is_dirty_writeback`` Called by the VM when attempting to reclaim a folio. The VM uses dirty and writeback information to determine if it needs to stall to allow flushers a chance to complete some IO. Ordinarily it can use folio_test_dirty and folio_test_writeback but some filesystems have more complex state (unstable folios in NFS prevent reclaim) or do not set those flags due to locking problems. This callback allows a filesystem to indicate to the VM if a folio should be treated as dirty or writeback for the purposes of stalling. ”h]”(j )�”}”(hŒ``is_dirty_writeback``”h]”j¦)�”}”(hj¼h]”hŒis_dirty_writeback”…”�”}”(hj¾h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjºubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´MÄhj¶ubj»)�”}”(hhh]”hÞ)�”}”(hXCalled by the VM when attempting to reclaim a folio. The VM uses dirty and writeback information to determine if it needs to stall to allow flushers a chance to complete some IO. Ordinarily it can use folio_test_dirty and folio_test_writeback but some filesystems have more complex state (unstable folios in NFS prevent reclaim) or do not set those flags due to locking problems. This callback allows a filesystem to indicate to the VM if a folio should be treated as dirty or writeback for the purposes of stalling.”h]”hXCalled by the VM when attempting to reclaim a folio. The VM uses dirty and writeback information to determine if it needs to stall to allow flushers a chance to complete some IO. Ordinarily it can use folio_test_dirty and folio_test_writeback but some filesystems have more complex state (unstable folios in NFS prevent reclaim) or do not set those flags due to locking problems. This callback allows a filesystem to indicate to the VM if a folio should be treated as dirty or writeback for the purposes of stalling.”…”�”}”(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™h³hÇh´MÄhj÷h²hubjš)�”}”(hX ``error_remove_folio`` normally set to generic_error_remove_folio if truncation is ok for this address space. Used for memory failure handling. Setting this implies you deal with pages going away under you, unless you have them locked or reference counts increased. ”h]”(j )�”}”(hŒ``error_remove_folio``”h]”j¦)�”}”(hjôh]”hŒerror_remove_folio”…”�”}”(hjöh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjòubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´MÊhjîubj»)�”}”(hhh]”hÞ)�”}”(hŒónormally set to generic_error_remove_folio if truncation is ok for this address space. Used for memory failure handling. Setting this implies you deal with pages going away under you, unless you have them locked or reference counts increased.”h]”hŒónormally set to generic_error_remove_folio if truncation is ok for this address space. Used for memory failure handling. Setting this implies you deal with pages going away under you, unless you have them locked or reference counts increased.”…”�”}”(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™h³hÇh´MÊhj÷h²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1j”hjÉh²hh³hÇh´NubhÞ)�”}”(hŒ``swap_activate``”h]”j¦)�”}”(hj.h]”hŒ swap_activate”…”�”}”(hj0h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj,ubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MÌhjÉh²hubjH)�”}”(hXÁCalled to prepare the given file for swap. It should perform any validation and preparation necessary to ensure that writes can be performed with minimal memory allocation. It should call add_swap_extent(), or the helper iomap_swapfile_activate(), and return the number of extents added. If IO should be submitted through the file system it should call swap_fs_activate, otherwise IO will be submitted directly to the block device ``sis->bdev``. ”h]”hÞ)�”}”(hXÀCalled to prepare the given file for swap. It should perform any validation and preparation necessary to ensure that writes can be performed with minimal memory allocation. It should call add_swap_extent(), or the helper iomap_swapfile_activate(), and return the number of extents added. If IO should be submitted through the file system it should call swap_fs_activate, otherwise IO will be submitted directly to the block device ``sis->bdev``.”h]”(hX²Called to prepare the given file for swap. It should perform any validation and preparation necessary to ensure that writes can be performed with minimal memory allocation. It should call add_swap_extent(), or the helper iomap_swapfile_activate(), and return the number of extents added. If IO should be submitted through the file system it should call swap_fs_activate, otherwise IO will be submitted directly to the block device ”…”�”}”(hjGh²hh³Nh´Nubj¦)�”}”(hŒ ``sis->bdev``”h]”hŒ sis->bdev”…”�”}”(hjOh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjGubhŒ.”…”�”}”(hjGh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MÎhjCubah}”(h]”h ]”h"]”h$]”h&]”uh1jGh³hÇh´MÎhjÉh²hubj•)�”}”(hhh]”jš)�”}”(hŒW``swap_deactivate`` Called during swapoff on files where swap_activate was successful. ”h]”(j )�”}”(hŒ``swap_deactivate``”h]”j¦)�”}”(hjvh]”hŒswap_deactivate”…”�”}”(hjxh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjtubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´MØhjpubj»)�”}”(hhh]”hÞ)�”}”(hŒBCalled during swapoff on files where swap_activate was successful.”h]”hŒBCalled during swapoff on files where swap_activate was successful.”…”�”}”(hjŽh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M×hj‹ubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhjpubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´MØhjmubah}”(h]”h ]”h"]”h$]”h&]”uh1j”hjÉh²hh³hÇh´Nubeh}”(h]”Œstruct-address-space-operations”ah ]”h"]”Œstruct address_space_operations”ah$]”h&]”uh1hÈhj±h²hh³hÇh´Mêubeh}”(h]”Œthe-address-space-object”ah ]”h"]”Œthe address space object”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´M~ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒThe File Object”h]”hŒThe File Object”…”�”}”(hjÁh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj¾h²hh³hÇh´MÛubhÞ)�”}”(hŒyA file object represents a file opened by a process. This is also known as an "open file description" in POSIX parlance.”h]”hŒ}A file object represents a file opened by a process. This is also known as an “open file descriptionâ€� in POSIX parlance.”…”�”}”(hjÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MÝhj¾h²hubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒstruct file_operations”h]”hŒstruct file_operations”…”�”}”(hjàh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjÝh²hh³hÇh´MâubhÞ)�”}”(hŒnThis describes how the VFS can manipulate an open file. As of kernel 4.18, the following members are defined:”h]”hŒnThis describes how the VFS can manipulate an open file. As of kernel 4.18, the following members are defined:”…”�”}”(hjîh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MähjÝh²hubj6)�”}”(hXž struct file_operations { struct module *owner; fop_flags_t fop_flags; loff_t (*llseek) (struct file *, loff_t, int); ssize_t (*read) (struct file *, char __user *, size_t, loff_t *); ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); ssize_t (*read_iter) (struct kiocb *, struct iov_iter *); ssize_t (*write_iter) (struct kiocb *, struct iov_iter *); int (*iopoll)(struct kiocb *kiocb, struct io_comp_batch *, unsigned int flags); int (*iterate_shared) (struct file *, struct dir_context *); __poll_t (*poll) (struct file *, struct poll_table_struct *); long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); long (*compat_ioctl) (struct file *, unsigned int, unsigned long); int (*mmap) (struct file *, struct vm_area_struct *); int (*open) (struct inode *, struct file *); int (*flush) (struct file *, fl_owner_t id); int (*release) (struct inode *, struct file *); int (*fsync) (struct file *, loff_t, loff_t, int datasync); int (*fasync) (int, struct file *, int); int (*lock) (struct file *, int, struct file_lock *); unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); int (*check_flags)(int); int (*flock) (struct file *, int, struct file_lock *); ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int); ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int); void (*splice_eof)(struct file *file); int (*setlease)(struct file *, int, struct file_lease **, void **); long (*fallocate)(struct file *file, int mode, loff_t offset, loff_t len); void (*show_fdinfo)(struct seq_file *m, struct file *f); #ifndef CONFIG_MMU unsigned (*mmap_capabilities)(struct file *); #endif ssize_t (*copy_file_range)(struct file *, loff_t, struct file *, loff_t, size_t, unsigned int); loff_t (*remap_file_range)(struct file *file_in, loff_t pos_in, struct file *file_out, loff_t pos_out, loff_t len, unsigned int remap_flags); int (*fadvise)(struct file *, loff_t, loff_t, int); int (*uring_cmd)(struct io_uring_cmd *ioucmd, unsigned int issue_flags); int (*uring_cmd_iopoll)(struct io_uring_cmd *, struct io_comp_batch *, unsigned int poll_flags); int (*mmap_prepare)(struct vm_area_desc *); };”h]”hXž struct file_operations { struct module *owner; fop_flags_t fop_flags; loff_t (*llseek) (struct file *, loff_t, int); ssize_t (*read) (struct file *, char __user *, size_t, loff_t *); ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); ssize_t (*read_iter) (struct kiocb *, struct iov_iter *); ssize_t (*write_iter) (struct kiocb *, struct iov_iter *); int (*iopoll)(struct kiocb *kiocb, struct io_comp_batch *, unsigned int flags); int (*iterate_shared) (struct file *, struct dir_context *); __poll_t (*poll) (struct file *, struct poll_table_struct *); long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); long (*compat_ioctl) (struct file *, unsigned int, unsigned long); int (*mmap) (struct file *, struct vm_area_struct *); int (*open) (struct inode *, struct file *); int (*flush) (struct file *, fl_owner_t id); int (*release) (struct inode *, struct file *); int (*fsync) (struct file *, loff_t, loff_t, int datasync); int (*fasync) (int, struct file *, int); int (*lock) (struct file *, int, struct file_lock *); unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); int (*check_flags)(int); int (*flock) (struct file *, int, struct file_lock *); ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int); ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int); void (*splice_eof)(struct file *file); int (*setlease)(struct file *, int, struct file_lease **, void **); long (*fallocate)(struct file *file, int mode, loff_t offset, loff_t len); void (*show_fdinfo)(struct seq_file *m, struct file *f); #ifndef CONFIG_MMU unsigned (*mmap_capabilities)(struct file *); #endif ssize_t (*copy_file_range)(struct file *, loff_t, struct file *, loff_t, size_t, unsigned int); loff_t (*remap_file_range)(struct file *file_in, loff_t pos_in, struct file *file_out, loff_t pos_out, loff_t len, unsigned int remap_flags); int (*fadvise)(struct file *, loff_t, loff_t, int); int (*uring_cmd)(struct io_uring_cmd *ioucmd, unsigned int issue_flags); int (*uring_cmd_iopoll)(struct io_uring_cmd *, struct io_comp_batch *, unsigned int poll_flags); int (*mmap_prepare)(struct vm_area_desc *); };”…”�”}”hjüsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆjE‰jFjGjH}”uh1j5h³hÇh´MçhjÝh²hubhÞ)�”}”(hŒSAgain, all methods are called without any locks being held, unless otherwise noted.”h]”hŒSAgain, all methods are called without any locks being held, unless otherwise noted.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MhjÝh²hubj•)�”}”(hhh]”(jš)�”}”(hŒE``llseek`` called when the VFS needs to move the file position index ”h]”(j )�”}”(hŒ ``llseek``”h]”j¦)�”}”(hj"h]”hŒllseek”…”�”}”(hj$h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´Mhjubj»)�”}”(hhh]”hÞ)�”}”(hŒ9called when the VFS needs to move the file position index”h]”hŒ9called when the VFS needs to move the file position index”…”�”}”(hj:h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Mhj7ubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´Mhjubjš)�”}”(hŒ4``read`` called by read(2) and related system calls ”h]”(j )�”}”(hŒ``read``”h]”j¦)�”}”(hjZh]”hŒread”…”�”}”(hj\h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjXubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´MhjTubj»)�”}”(hhh]”hÞ)�”}”(hŒ*called by read(2) and related system calls”h]”hŒ*called by read(2) and related system calls”…”�”}”(hjrh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Mhjoubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhjTubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´Mhjh²hubjš)�”}”(hŒF``read_iter`` possibly asynchronous read with iov_iter as destination ”h]”(j )�”}”(hŒ ``read_iter``”h]”j¦)�”}”(hj’h]”hŒ read_iter”…”�”}”(hj”h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj�ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M!hjŒubj»)�”}”(hhh]”hÞ)�”}”(hŒ7possibly asynchronous read with iov_iter as destination”h]”hŒ7possibly asynchronous read with iov_iter as destination”…”�”}”(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™h³hÇh´M!hjh²hubjš)�”}”(hŒ6``write`` called by write(2) and related system calls ”h]”(j )�”}”(hŒ ``write``”h]”j¦)�”}”(hjÊh]”hŒwrite”…”�”}”(hjÌh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjÈubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M$hjÄubj»)�”}”(hhh]”hÞ)�”}”(hŒ+called by write(2) and related system calls”h]”hŒ+called by write(2) and related system calls”…”�”}”(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™h³hÇh´M$hjh²hubjš)�”}”(hŒC``write_iter`` possibly asynchronous write with iov_iter as source ”h]”(j )�”}”(hŒ``write_iter``”h]”j¦)�”}”(hjh]”hŒ write_iter”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M'hjüubj»)�”}”(hhh]”hÞ)�”}”(hŒ3possibly asynchronous write with iov_iter as source”h]”hŒ3possibly asynchronous write with iov_iter as source”…”�”}”(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™h³hÇh´M'hjh²hubjš)�”}”(hŒH``iopoll`` called when aio wants to poll for completions on HIPRI iocbs ”h]”(j )�”}”(hŒ ``iopoll``”h]”j¦)�”}”(hj:h]”hŒiopoll”…”�”}”(hj<h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj8ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M*hj4ubj»)�”}”(hhh]”hÞ)�”}”(hŒ``remap_file_range`` called by the ioctl(2) system call for FICLONERANGE and FICLONE and FIDEDUPERANGE commands to remap file ranges. An implementation should remap len bytes at pos_in of the source file into the dest file at pos_out. Implementations must handle callers passing in len == 0; this means "remap to the end of the source file". The return value should the number of bytes remapped, or the usual negative error code if errors occurred before any bytes were remapped. The remap_flags parameter accepts REMAP_FILE_* flags. If REMAP_FILE_DEDUP is set then the implementation must only remap if the requested file ranges have identical contents. If REMAP_FILE_CAN_SHORTEN is set, the caller is ok with the implementation shortening the request length to satisfy alignment or EOF requirements (or any other reason). ”h]”(j )�”}”(hŒ``remap_file_range``”h]”j¦)�”}”(hjÖh]”hŒremap_file_range”…”�”}”(hjØh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjÔubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´MˆhjÐubj»)�”}”(hhh]”hÞ)�”}”(hX(called by the ioctl(2) system call for FICLONERANGE and FICLONE and FIDEDUPERANGE commands to remap file ranges. An implementation should remap len bytes at pos_in of the source file into the dest file at pos_out. Implementations must handle callers passing in len == 0; this means "remap to the end of the source file". The return value should the number of bytes remapped, or the usual negative error code if errors occurred before any bytes were remapped. The remap_flags parameter accepts REMAP_FILE_* flags. If REMAP_FILE_DEDUP is set then the implementation must only remap if the requested file ranges have identical contents. If REMAP_FILE_CAN_SHORTEN is set, the caller is ok with the implementation shortening the request length to satisfy alignment or EOF requirements (or any other reason).”h]”hX,called by the ioctl(2) system call for FICLONERANGE and FICLONE and FIDEDUPERANGE commands to remap file ranges. An implementation should remap len bytes at pos_in of the source file into the dest file at pos_out. Implementations must handle callers passing in len == 0; this means “remap to the end of the source fileâ€�. The return value should the number of bytes remapped, or the usual negative error code if errors occurred before any bytes were remapped. The remap_flags parameter accepts REMAP_FILE_* flags. If REMAP_FILE_DEDUP is set then the implementation must only remap if the requested file ranges have identical contents. If REMAP_FILE_CAN_SHORTEN is set, the caller is ok with the implementation shortening the request length to satisfy alignment or EOF requirements (or any other reason).”…”�”}”(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™h³hÇh´Mˆhjh²hubjš)�”}”(hŒ<``fadvise`` possibly called by the fadvise64() system call. ”h]”(j )�”}”(hŒ ``fadvise``”h]”j¦)�”}”(hjh]”hŒfadvise”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M‹hjubj»)�”}”(hhh]”hÞ)�”}”(hŒ/possibly called by the fadvise64() system call.”h]”hŒ/possibly called by the fadvise64() system call.”…”�”}”(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™h³hÇh´M‹hjh²hubjš)�”}”(hXC``mmap_prepare`` Called by the mmap(2) system call. Allows a VFS to set up a file-backed memory mapping, most notably establishing relevant private state and VMA callbacks. If further action such as pre-population of page tables is required, this can be specified by the vm_area_desc->action field and related parameters. ”h]”(j )�”}”(hŒ``mmap_prepare``”h]”j¦)�”}”(hjFh]”hŒ mmap_prepare”…”�”}”(hjHh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjDubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M”hj@ubj»)�”}”(hhh]”(hÞ)�”}”(hŒ›Called by the mmap(2) system call. Allows a VFS to set up a file-backed memory mapping, most notably establishing relevant private state and VMA callbacks.”h]”hŒ›Called by the mmap(2) system call. Allows a VFS to set up a file-backed memory mapping, most notably establishing relevant private state and VMA callbacks.”…”�”}”(hj^h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MŽhj[ubhÞ)�”}”(hŒ”If further action such as pre-population of page tables is required, this can be specified by the vm_area_desc->action field and related parameters.”h]”hŒ”If further action such as pre-population of page tables is required, this can be specified by the vm_area_desc->action field and related parameters.”…”�”}”(hjlh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M’hj[ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jºhj@ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´M”hjh²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1j”hjÝh²hh³hÇh´NubhÞ)�”}”(hX%Note that the file operations are implemented by the specific filesystem in which the inode resides. When opening a device node (character or block special) most filesystems will call special support routines in the VFS which will locate the required device driver information. These support routines replace the filesystem file operations with those for the device driver, and then proceed to call the new open() method for the file. This is how opening a device file in the filesystem eventually ends up calling the device driver open() method.”h]”hX%Note that the file operations are implemented by the specific filesystem in which the inode resides. When opening a device node (character or block special) most filesystems will call special support routines in the VFS which will locate the required device driver information. These support routines replace the filesystem file operations with those for the device driver, and then proceed to call the new open() method for the file. This is how opening a device file in the filesystem eventually ends up calling the device driver open() method.”…”�”}”(hjŒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M–hjÝh²hubeh}”(h]”Œstruct-file-operations”ah ]”h"]”Œstruct file_operations”ah$]”h&]”uh1hÈhj¾h²hh³hÇh´Mâubeh}”(h]”Œid2”ah ]”h"]”h$]”j ah&]”uh1hÈhhÊh²hh³hÇh´MÛj£KubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒDirectory Entry Cache (dcache)”h]”hŒDirectory Entry Cache (dcache)”…”�”}”(hj¬h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj©h²hh³hÇh´M¢ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒstruct dentry_operations”h]”hŒstruct dentry_operations”…”�”}”(hj½h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjºh²hh³hÇh´M¦ubhÞ)�”}”(hXhThis describes how a filesystem can overload the standard dentry operations. Dentries and the dcache are the domain of the VFS and the individual filesystem implementations. Device drivers have no business here. These methods may be set to NULL, as they are either optional or the VFS uses a default. As of kernel 2.6.22, the following members are defined:”h]”hXhThis describes how a filesystem can overload the standard dentry operations. Dentries and the dcache are the domain of the VFS and the individual filesystem implementations. Device drivers have no business here. These methods may be set to NULL, as they are either optional or the VFS uses a default. As of kernel 2.6.22, the following members are defined:”…”�”}”(hjËh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M¨hjºh²hubj6)�”}”(hX±struct dentry_operations { int (*d_revalidate)(struct inode *, const struct qstr *, struct dentry *, unsigned int); int (*d_weak_revalidate)(struct dentry *, unsigned int); int (*d_hash)(const struct dentry *, struct qstr *); int (*d_compare)(const struct dentry *, unsigned int, const char *, const struct qstr *); int (*d_delete)(const struct dentry *); int (*d_init)(struct dentry *); void (*d_release)(struct dentry *); void (*d_iput)(struct dentry *, struct inode *); char *(*d_dname)(struct dentry *, char *, int); struct vfsmount *(*d_automount)(struct path *); int (*d_manage)(const struct path *, bool); struct dentry *(*d_real)(struct dentry *, enum d_real_type type); bool (*d_unalias_trylock)(const struct dentry *); void (*d_unalias_unlock)(const struct dentry *); };”h]”hX±struct dentry_operations { int (*d_revalidate)(struct inode *, const struct qstr *, struct dentry *, unsigned int); int (*d_weak_revalidate)(struct dentry *, unsigned int); int (*d_hash)(const struct dentry *, struct qstr *); int (*d_compare)(const struct dentry *, unsigned int, const char *, const struct qstr *); int (*d_delete)(const struct dentry *); int (*d_init)(struct dentry *); void (*d_release)(struct dentry *); void (*d_iput)(struct dentry *, struct inode *); char *(*d_dname)(struct dentry *, char *, int); struct vfsmount *(*d_automount)(struct path *); int (*d_manage)(const struct path *, bool); struct dentry *(*d_real)(struct dentry *, enum d_real_type type); bool (*d_unalias_trylock)(const struct dentry *); void (*d_unalias_unlock)(const struct dentry *); };”…”�”}”hjÙsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆjE‰jFjGjH}”uh1j5h³hÇh´M¯hjºh²hubj•)�”}”(hhh]”(jš)�”}”(hX…``d_revalidate`` called when the VFS needs to revalidate a dentry. This is called whenever a name look-up finds a dentry in the dcache. Most local filesystems leave this as NULL, because all their dentries in the dcache are valid. Network filesystems are different since things can change on the server without the client necessarily being aware of it. This function should return a positive value if the dentry is still valid, and zero or a negative error code if it isn't. d_revalidate may be called in rcu-walk mode (flags & LOOKUP_RCU). If in rcu-walk mode, the filesystem must revalidate the dentry without blocking or storing to the dentry, d_parent and d_inode should not be used without care (because they can change and, in d_inode case, even become NULL under us). If a situation is encountered that rcu-walk cannot handle, return -ECHILD and it will be called again in ref-walk mode. ”h]”(j )�”}”(hŒ``d_revalidate``”h]”j¦)�”}”(hjñh]”hŒ d_revalidate”…”�”}”(hjóh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjïubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´MØhjëubj»)�”}”(hhh]”(hÞ)�”}”(hXQcalled when the VFS needs to revalidate a dentry. This is called whenever a name look-up finds a dentry in the dcache. Most local filesystems leave this as NULL, because all their dentries in the dcache are valid. Network filesystems are different since things can change on the server without the client necessarily being aware of it.”h]”hXQcalled when the VFS needs to revalidate a dentry. This is called whenever a name look-up finds a dentry in the dcache. Most local filesystems leave this as NULL, because all their dentries in the dcache are valid. Network filesystems are different since things can change on the server without the client necessarily being aware of it.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MÅhjubhÞ)�”}”(hŒyThis function should return a positive value if the dentry is still valid, and zero or a negative error code if it isn't.”h]”hŒ{This function should return a positive value if the dentry is still valid, and zero or a negative error code if it isn’t.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MÌhjubhÞ)�”}”(hX,d_revalidate may be called in rcu-walk mode (flags & LOOKUP_RCU). If in rcu-walk mode, the filesystem must revalidate the dentry without blocking or storing to the dentry, d_parent and d_inode should not be used without care (because they can change and, in d_inode case, even become NULL under us).”h]”hX,d_revalidate may be called in rcu-walk mode (flags & LOOKUP_RCU). If in rcu-walk mode, the filesystem must revalidate the dentry without blocking or storing to the dentry, d_parent and d_inode should not be used without care (because they can change and, in d_inode case, even become NULL under us).”…”�”}”(hj%h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MÏhjubhÞ)�”}”(hŒwIf a situation is encountered that rcu-walk cannot handle, return -ECHILD and it will be called again in ref-walk mode.”h]”hŒwIf a situation is encountered that rcu-walk cannot handle, return -ECHILD and it will be called again in ref-walk mode.”…”�”}”(hj3h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MÖhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jºhjëubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´MØhjèubjš)�”}”(hX�``d_weak_revalidate`` called when the VFS needs to revalidate a "jumped" dentry. This is called when a path-walk ends at dentry that was not acquired by doing a lookup in the parent directory. This includes "/", "." and "..", as well as procfs-style symlinks and mountpoint traversal. In this case, we are less concerned with whether the dentry is still fully correct, but rather that the inode is still valid. As with d_revalidate, most local filesystems will set this to NULL since their dcache entries are always valid. This function has the same return code semantics as d_revalidate. d_weak_revalidate is only called after leaving rcu-walk mode. ”h]”(j )�”}”(hŒ``d_weak_revalidate``”h]”j¦)�”}”(hjSh]”hŒd_weak_revalidate”…”�”}”(hjUh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjQubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´MéhjMubj»)�”}”(hhh]”(hÞ)�”}”(hXcalled when the VFS needs to revalidate a "jumped" dentry. This is called when a path-walk ends at dentry that was not acquired by doing a lookup in the parent directory. This includes "/", "." and "..", as well as procfs-style symlinks and mountpoint traversal.”h]”hXcalled when the VFS needs to revalidate a “jumpedâ€� dentry. This is called when a path-walk ends at dentry that was not acquired by doing a lookup in the parent directory. This includes “/â€�, “.â€� and “..â€�, as well as procfs-style symlinks and mountpoint traversal.”…”�”}”(hjkh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MÛhjhubhÞ)�”}”(hŒíIn this case, we are less concerned with whether the dentry is still fully correct, but rather that the inode is still valid. As with d_revalidate, most local filesystems will set this to NULL since their dcache entries are always valid.”h]”hŒíIn this case, we are less concerned with whether the dentry is still fully correct, but rather that the inode is still valid. As with d_revalidate, most local filesystems will set this to NULL since their dcache entries are always valid.”…”�”}”(hjyh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MáhjhubhÞ)�”}”(hŒAThis function has the same return code semantics as d_revalidate.”h]”hŒAThis function has the same return code semantics as d_revalidate.”…”�”}”(hj‡h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MæhjhubhÞ)�”}”(hŒ=d_weak_revalidate is only called after leaving rcu-walk mode.”h]”hŒ=d_weak_revalidate is only called after leaving rcu-walk mode.”…”�”}”(hj•h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Méhjhubeh}”(h]”h ]”h"]”h$]”h&]”uh1jºhjMubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´Méhjèh²hubjš)�”}”(hŒÿ``d_hash`` called when the VFS adds a dentry to the hash table. The first dentry passed to d_hash is the parent directory that the name is to be hashed into. Same locking and synchronisation rules as d_compare regarding what is safe to dereference etc. ”h]”(j )�”}”(hŒ ``d_hash``”h]”j¦)�”}”(hjµh]”hŒd_hash”…”�”}”(hj·h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj³ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´Mñhj¯ubj»)�”}”(hhh]”(hÞ)�”}”(hŒ“called when the VFS adds a dentry to the hash table. The first dentry passed to d_hash is the parent directory that the name is to be hashed into.”h]”hŒ“called when the VFS adds a dentry to the hash table. The first dentry passed to d_hash is the parent directory that the name is to be hashed into.”…”�”}”(hjÍh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MìhjÊubhÞ)�”}”(hŒ^Same locking and synchronisation rules as d_compare regarding what is safe to dereference etc.”h]”hŒ^Same locking and synchronisation rules as d_compare regarding what is safe to dereference etc.”…”�”}”(hjÛh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MðhjÊubeh}”(h]”h ]”h"]”h$]”h&]”uh1jºhj¯ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´Mñhjèh²hubjš)�”}”(hX``d_compare`` called to compare a dentry name with a given name. The first dentry is the parent of the dentry to be compared, the second is the child dentry. len and name string are properties of the dentry to be compared. qstr is the name to compare it with. Must be constant and idempotent, and should not take locks if possible, and should not or store into the dentry. Should not dereference pointers outside the dentry without lots of care (eg. d_parent, d_inode, d_name should not be used). However, our vfsmount is pinned, and RCU held, so the dentries and inodes won't disappear, neither will our sb or filesystem module. ->d_sb may be used. It is a tricky calling convention because it needs to be called under "rcu-walk", ie. without any locks or references on things. ”h]”(j )�”}”(hŒ ``d_compare``”h]”j¦)�”}”(hjûh]”hŒ d_compare”…”�”}”(hjýh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjùubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´Mhjõubj»)�”}”(hhh]”(hÞ)�”}”(hŒøcalled to compare a dentry name with a given name. The first dentry is the parent of the dentry to be compared, the second is the child dentry. len and name string are properties of the dentry to be compared. qstr is the name to compare it with.”h]”hŒøcalled to compare a dentry name with a given name. The first dentry is the parent of the dentry to be compared, the second is the child dentry. len and name string are properties of the dentry to be compared. qstr is the name to compare it with.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Môhj ubhÞ)�”}”(hŒîMust be constant and idempotent, and should not take locks if possible, and should not or store into the dentry. Should not dereference pointers outside the dentry without lots of care (eg. d_parent, d_inode, d_name should not be used).”h]”hŒîMust be constant and idempotent, and should not take locks if possible, and should not or store into the dentry. Should not dereference pointers outside the dentry without lots of care (eg. d_parent, d_inode, d_name should not be used).”…”�”}”(hj! h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Mùhj ubhÞ)�”}”(hŒ™However, our vfsmount is pinned, and RCU held, so the dentries and inodes won't disappear, neither will our sb or filesystem module. ->d_sb may be used.”h]”hŒ›However, our vfsmount is pinned, and RCU held, so the dentries and inodes won’t disappear, neither will our sb or filesystem module. ->d_sb may be used.”…”�”}”(hj/ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Mþhj ubhÞ)�”}”(hŒ€It is a tricky calling convention because it needs to be called under "rcu-walk", ie. without any locks or references on things.”h]”hŒ„It is a tricky calling convention because it needs to be called under “rcu-walkâ€�, ie. without any locks or references on things.”…”�”}”(hj= h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Mhj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jºhjõubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´Mhjèh²hubjš)�”}”(hX!``d_delete`` called when the last reference to a dentry is dropped and the dcache is deciding whether or not to cache it. Return 1 to delete immediately, or 0 to cache the dentry. Default is NULL which means to always cache a reachable dentry. d_delete must be constant and idempotent. ”h]”(j )�”}”(hŒ ``d_delete``”h]”j¦)�”}”(hj] h]”hŒd_delete”…”�”}”(hj_ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj[ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M hjW ubj»)�”}”(hhh]”hÞ)�”}”(hXcalled when the last reference to a dentry is dropped and the dcache is deciding whether or not to cache it. Return 1 to delete immediately, or 0 to cache the dentry. Default is NULL which means to always cache a reachable dentry. d_delete must be constant and idempotent.”•\—h]”hXcalled when the last reference to a dentry is dropped and the dcache is deciding whether or not to cache it. Return 1 to delete immediately, or 0 to cache the dentry. Default is NULL which means to always cache a reachable dentry. d_delete must be constant and idempotent.”…”�”}”(hju h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Mhjr ubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhjW ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´M hjèh²hubjš)�”}”(hŒ-``d_init`` called when a dentry is allocated ”h]”(j )�”}”(hŒ ``d_init``”h]”j¦)�”}”(hj• h]”hŒd_init”…”�”}”(hj— h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj“ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M hj� ubj»)�”}”(hhh]”hÞ)�”}”(hŒ!called when a dentry is allocated”h]”hŒ!called when a dentry is allocated”…”�”}”(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™h³hÇh´M hjèh²hubjš)�”}”(hŒ9``d_release`` called when a dentry is really deallocated ”h]”(j )�”}”(hŒ ``d_release``”h]”j¦)�”}”(hjÍ h]”hŒ d_release”…”�”}”(hjÏ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjË ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´MhjÇ ubj»)�”}”(hhh]”hÞ)�”}”(hŒ*called when a dentry is really deallocated”h]”hŒ*called when a dentry is really deallocated”…”�”}”(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™h³hÇh´Mhjèh²hubjš)�”}”(hŒÎ``d_iput`` called when a dentry loses its inode (just prior to its being deallocated). The default when this is NULL is that the VFS calls iput(). If you define this method, you must call iput() yourself ”h]”(j )�”}”(hŒ ``d_iput``”h]”j¦)�”}”(hj!h]”hŒd_iput”…”�”}”(hj!h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj!ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´Mhjÿ ubj»)�”}”(hhh]”hÞ)�”}”(hŒÂcalled when a dentry loses its inode (just prior to its being deallocated). The default when this is NULL is that the VFS calls iput(). If you define this method, you must call iput() yourself”h]”hŒÂcalled when a dentry loses its inode (just prior to its being deallocated). The default when this is NULL is that the VFS calls iput(). If you define this method, you must call iput() yourself”…”�”}”(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™h³hÇh´Mhjèh²hubjš)�”}”(hXí``d_dname`` called when the pathname of a dentry should be generated. Useful for some pseudo filesystems (sockfs, pipefs, ...) to delay pathname generation. (Instead of doing it when dentry is created, it's done only when the path is needed.). Real filesystems probably dont want to use it, because their dentries are present in global dcache hash, so their hash should be an invariant. As no lock is held, d_dname() should not try to modify the dentry itself, unless appropriate SMP safety is used. CAUTION : d_path() logic is quite tricky. The correct way to return for example "Hello" is to put it at the end of the buffer, and returns a pointer to the first char. dynamic_dname() helper function is provided to take care of this. Example : ”h]”(j )�”}”(hŒ ``d_dname``”h]”j¦)�”}”(hj=!h]”hŒd_dname”…”�”}”(hj?!h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj;!ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M'hj7!ubj»)�”}”(hhh]”(hÞ)�”}”(hXÕcalled when the pathname of a dentry should be generated. Useful for some pseudo filesystems (sockfs, pipefs, ...) to delay pathname generation. (Instead of doing it when dentry is created, it's done only when the path is needed.). Real filesystems probably dont want to use it, because their dentries are present in global dcache hash, so their hash should be an invariant. As no lock is held, d_dname() should not try to modify the dentry itself, unless appropriate SMP safety is used. CAUTION : d_path() logic is quite tricky. The correct way to return for example "Hello" is to put it at the end of the buffer, and returns a pointer to the first char. dynamic_dname() helper function is provided to take care of this.”h]”hXÛcalled when the pathname of a dentry should be generated. Useful for some pseudo filesystems (sockfs, pipefs, ...) to delay pathname generation. (Instead of doing it when dentry is created, it’s done only when the path is needed.). Real filesystems probably dont want to use it, because their dentries are present in global dcache hash, so their hash should be an invariant. As no lock is held, d_dname() should not try to modify the dentry itself, unless appropriate SMP safety is used. CAUTION : d_path() logic is quite tricky. The correct way to return for example “Helloâ€� is to put it at the end of the buffer, and returns a pointer to the first char. dynamic_dname() helper function is provided to take care of this.”…”�”}”(hjU!h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MhjR!ubhÞ)�”}”(hŒ Example :”h]”hŒ Example :”…”�”}”(hjc!h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M'hjR!ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jºhj7!ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´M'hjèh²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1j”hjºh²hh³hÇh´Nubj6)�”}”(hŒÀstatic char *pipefs_dname(struct dentry *dent, char *buffer, int buflen) { return dynamic_dname(dentry, buffer, buflen, "pipe:[%lu]", dentry->d_inode->i_ino); }”h]”hŒÀstatic char *pipefs_dname(struct dentry *dent, char *buffer, int buflen) { return dynamic_dname(dentry, buffer, buflen, "pipe:[%lu]", dentry->d_inode->i_ino); }”…”�”}”hjƒ!sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆjE‰jFjGjH}”uh1j5h³hÇh´M)hjºh²hubj•)�”}”(hhh]”(jš)�”}”(hX¬``d_automount`` called when an automount dentry is to be traversed (optional). This should create a new VFS mount record and return the record to the caller. The caller is supplied with a path parameter giving the automount directory to describe the automount target and the parent VFS mount record to provide inheritable mount parameters. NULL should be returned if someone else managed to make the automount first. If the vfsmount creation failed, then an error code should be returned. If -EISDIR is returned, then the directory will be treated as an ordinary directory and returned to pathwalk to continue walking. If a vfsmount is returned, the caller will attempt to mount it on the mountpoint and will remove the vfsmount from its expiration list in the case of failure. This function is only used if DCACHE_NEED_AUTOMOUNT is set on the dentry. This is set by __d_instantiate() if S_AUTOMOUNT is set on the inode being added. ”h]”(j )�”}”(hŒ``d_automount``”h]”j¦)�”}”(hj›!h]”hŒ d_automount”…”�”}”(hj�!h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj™!ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´MChj•!ubj»)�”}”(hhh]”(hÞ)�”}”(hX^called when an automount dentry is to be traversed (optional). This should create a new VFS mount record and return the record to the caller. The caller is supplied with a path parameter giving the automount directory to describe the automount target and the parent VFS mount record to provide inheritable mount parameters. NULL should be returned if someone else managed to make the automount first. If the vfsmount creation failed, then an error code should be returned. If -EISDIR is returned, then the directory will be treated as an ordinary directory and returned to pathwalk to continue walking.”h]”hX^called when an automount dentry is to be traversed (optional). This should create a new VFS mount record and return the record to the caller. The caller is supplied with a path parameter giving the automount directory to describe the automount target and the parent VFS mount record to provide inheritable mount parameters. NULL should be returned if someone else managed to make the automount first. If the vfsmount creation failed, then an error code should be returned. If -EISDIR is returned, then the directory will be treated as an ordinary directory and returned to pathwalk to continue walking.”…”�”}”(hj³!h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M2hj°!ubhÞ)�”}”(hŒžIf a vfsmount is returned, the caller will attempt to mount it on the mountpoint and will remove the vfsmount from its expiration list in the case of failure.”h]”hŒžIf a vfsmount is returned, the caller will attempt to mount it on the mountpoint and will remove the vfsmount from its expiration list in the case of failure.”…”�”}”(hjÁ!h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M=hj°!ubhÞ)�”}”(hŒ›This function is only used if DCACHE_NEED_AUTOMOUNT is set on the dentry. This is set by __d_instantiate() if S_AUTOMOUNT is set on the inode being added.”h]”hŒ›This function is only used if DCACHE_NEED_AUTOMOUNT is set on the dentry. This is set by __d_instantiate() if S_AUTOMOUNT is set on the inode being added.”…”�”}”(hjÏ!h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MAhj°!ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jºhj•!ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´MChj’!ubjš)�”}”(hX™``d_manage`` called to allow the filesystem to manage the transition from a dentry (optional). This allows autofs, for example, to hold up clients waiting to explore behind a 'mountpoint' while letting the daemon go past and construct the subtree there. 0 should be returned to let the calling process continue. -EISDIR can be returned to tell pathwalk to use this directory as an ordinary directory and to ignore anything mounted on it and not to check the automount flag. Any other error code will abort pathwalk completely. If the 'rcu_walk' parameter is true, then the caller is doing a pathwalk in RCU-walk mode. Sleeping is not permitted in this mode, and the caller can be asked to leave it and call again by returning -ECHILD. -EISDIR may also be returned to tell pathwalk to ignore d_automount or any mounts. This function is only used if DCACHE_MANAGE_TRANSIT is set on the dentry being transited from. ”h]”(j )�”}”(hŒ ``d_manage``”h]”j¦)�”}”(hjï!h]”hŒd_manage”…”�”}”(hjñ!h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjí!ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´MWhjé!ubj»)�”}”(hhh]”(hÞ)�”}”(hXcalled to allow the filesystem to manage the transition from a dentry (optional). This allows autofs, for example, to hold up clients waiting to explore behind a 'mountpoint' while letting the daemon go past and construct the subtree there. 0 should be returned to let the calling process continue. -EISDIR can be returned to tell pathwalk to use this directory as an ordinary directory and to ignore anything mounted on it and not to check the automount flag. Any other error code will abort pathwalk completely.”h]”hX called to allow the filesystem to manage the transition from a dentry (optional). This allows autofs, for example, to hold up clients waiting to explore behind a ‘mountpoint’ while letting the daemon go past and construct the subtree there. 0 should be returned to let the calling process continue. -EISDIR can be returned to tell pathwalk to use this directory as an ordinary directory and to ignore anything mounted on it and not to check the automount flag. Any other error code will abort pathwalk completely.”…”�”}”(hj"h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MFhj"ubhÞ)�”}”(hX$If the 'rcu_walk' parameter is true, then the caller is doing a pathwalk in RCU-walk mode. Sleeping is not permitted in this mode, and the caller can be asked to leave it and call again by returning -ECHILD. -EISDIR may also be returned to tell pathwalk to ignore d_automount or any mounts.”h]”hX(If the ‘rcu_walk’ parameter is true, then the caller is doing a pathwalk in RCU-walk mode. Sleeping is not permitted in this mode, and the caller can be asked to leave it and call again by returning -ECHILD. -EISDIR may also be returned to tell pathwalk to ignore d_automount or any mounts.”…”�”}”(hj"h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MPhj"ubhÞ)�”}”(hŒ^This function is only used if DCACHE_MANAGE_TRANSIT is set on the dentry being transited from.”h]”hŒ^This function is only used if DCACHE_MANAGE_TRANSIT is set on the dentry being transited from.”…”�”}”(hj#"h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MVhj"ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jºhjé!ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´MWhj’!h²hubjš)�”}”(hX†``d_real`` overlay/union type filesystems implement this method to return one of the underlying dentries of a regular file hidden by the overlay. The 'type' argument takes the values D_REAL_DATA or D_REAL_METADATA for returning the real underlying dentry that refers to the inode hosting the file's data or metadata respectively. For non-regular files, the 'dentry' argument is returned. ”h]”(j )�”}”(hŒ ``d_real``”h]”j¦)�”}”(hjC"h]”hŒd_real”…”�”}”(hjE"h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjA"ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´Mahj="ubj»)�”}”(hhh]”(hÞ)�”}”(hŒ†overlay/union type filesystems implement this method to return one of the underlying dentries of a regular file hidden by the overlay.”h]”hŒ†overlay/union type filesystems implement this method to return one of the underlying dentries of a regular file hidden by the overlay.”…”�”}”(hj["h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MZhjX"ubhÞ)�”}”(hŒ·The 'type' argument takes the values D_REAL_DATA or D_REAL_METADATA for returning the real underlying dentry that refers to the inode hosting the file's data or metadata respectively.”h]”hŒ½The ‘type’ argument takes the values D_REAL_DATA or D_REAL_METADATA for returning the real underlying dentry that refers to the inode hosting the file’s data or metadata respectively.”…”�”}”(hji"h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M]hjX"ubhÞ)�”}”(hŒ9For non-regular files, the 'dentry' argument is returned.”h]”hŒ=For non-regular files, the ‘dentry’ argument is returned.”…”�”}”(hjw"h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MahjX"ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jºhj="ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´Mahj’!h²hubjš)�”}”(hX‘``d_unalias_trylock`` if present, will be called by d_splice_alias() before moving a preexisting attached alias. Returning false prevents __d_move(), making d_splice_alias() fail with -ESTALE. Rationale: setting FS_RENAME_DOES_D_MOVE will prevent d_move() and d_exchange() calls from the outside of filesystem methods; however, it does not guarantee that attached dentries won't be renamed or moved by d_splice_alias() finding a preexisting alias for a directory inode. Normally we would not care; however, something that wants to stabilize the entire path to root over a blocking operation might need that. See 9p for one (and hopefully only) example. ”h]”(j )�”}”(hŒ``d_unalias_trylock``”h]”j¦)�”}”(hj—"h]”hŒd_unalias_trylock”…”�”}”(hj™"h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj•"ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´Mohj‘"ubj»)�”}”(hhh]”(hÞ)�”}”(hŒ«if present, will be called by d_splice_alias() before moving a preexisting attached alias. Returning false prevents __d_move(), making d_splice_alias() fail with -ESTALE.”h]”hŒ«if present, will be called by d_splice_alias() before moving a preexisting attached alias. Returning false prevents __d_move(), making d_splice_alias() fail with -ESTALE.”…”�”}”(hj¯"h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Mdhj¬"ubhÞ)�”}”(hXÍRationale: setting FS_RENAME_DOES_D_MOVE will prevent d_move() and d_exchange() calls from the outside of filesystem methods; however, it does not guarantee that attached dentries won't be renamed or moved by d_splice_alias() finding a preexisting alias for a directory inode. Normally we would not care; however, something that wants to stabilize the entire path to root over a blocking operation might need that. See 9p for one (and hopefully only) example.”h]”hXÏRationale: setting FS_RENAME_DOES_D_MOVE will prevent d_move() and d_exchange() calls from the outside of filesystem methods; however, it does not guarantee that attached dentries won’t be renamed or moved by d_splice_alias() finding a preexisting alias for a directory inode. Normally we would not care; however, something that wants to stabilize the entire path to root over a blocking operation might need that. See 9p for one (and hopefully only) example.”…”�”}”(hj½"h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Mhhj¬"ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jºhj‘"ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´Mohj’!h²hubjš)�”}”(hŒ~``d_unalias_unlock`` should be paired with ``d_unalias_trylock``; that one is called after __d_move() call in __d_unalias(). ”h]”(j )�”}”(hŒ``d_unalias_unlock``”h]”j¦)�”}”(hjÝ"h]”hŒd_unalias_unlock”…”�”}”(hjß"h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjÛ"ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´Mthj×"ubj»)�”}”(hhh]”hÞ)�”}”(hŒgshould be paired with ``d_unalias_trylock``; that one is called after __d_move() call in __d_unalias().”h]”(hŒshould be paired with ”…”�”}”(hjõ"h²hh³Nh´Nubj¦)�”}”(hŒ``d_unalias_trylock``”h]”hŒd_unalias_trylock”…”�”}”(hjý"h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjõ"ubhŒ<; that one is called after __d_move() call in __d_unalias().”…”�”}”(hjõ"h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Mrhjò"ubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhj×"ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´Mthj’!h²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1j”hjºh²hh³hÇh´NubhÞ)�”}”(hŒ’Each dentry has a pointer to its parent dentry, as well as a hash list of child dentries. Child dentries are basically like files in a directory.”h]”hŒ’Each dentry has a pointer to its parent dentry, as well as a hash list of child dentries. Child dentries are basically like files in a directory.”…”�”}”(hj'#h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Mvhjºh²hubeh}”(h]”Œstruct-dentry-operations”ah ]”h"]”Œstruct dentry_operations”ah$]”h&]”uh1hÈhj©h²hh³hÇh´M¦ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒDirectory Entry Cache API”h]”hŒDirectory Entry Cache API”…”�”}”(hj@#h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj=#h²hh³hÇh´M|ubhÞ)�”}”(hŒYThere are a number of functions defined which permit a filesystem to manipulate dentries:”h]”hŒYThere are a number of functions defined which permit a filesystem to manipulate dentries:”…”�”}”(hjN#h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M~hj=#h²hubj•)�”}”(hhh]”(jš)�”}”(hŒY``dget`` open a new handle for an existing dentry (this just increments the usage count) ”h]”(j )�”}”(hŒ``dget``”h]”j¦)�”}”(hje#h]”hŒdget”…”�”}”(hjg#h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjc#ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´Mƒhj_#ubj»)�”}”(hhh]”hÞ)�”}”(hŒOopen a new handle for an existing dentry (this just increments the usage count)”h]”hŒOopen a new handle for an existing dentry (this just increments the usage count)”…”�”}”(hj}#h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M‚hjz#ubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhj_#ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´Mƒhj\#ubjš)�”}”(hX{``dput`` close a handle for a dentry (decrements the usage count). If the usage count drops to 0, and the dentry is still in its parent's hash, the "d_delete" method is called to check whether it should be cached. If it should not be cached, or if the dentry is not hashed, it is deleted. Otherwise cached dentries are put into an LRU list to be reclaimed on memory shortage. ”h]”(j )�”}”(hŒ``dput``”h]”j¦)�”}”(hj�#h]”hŒdput”…”�”}”(hjŸ#h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj›#ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M‹hj—#ubj»)�”}”(hhh]”hÞ)�”}”(hXqclose a handle for a dentry (decrements the usage count). If the usage count drops to 0, and the dentry is still in its parent's hash, the "d_delete" method is called to check whether it should be cached. If it should not be cached, or if the dentry is not hashed, it is deleted. Otherwise cached dentries are put into an LRU list to be reclaimed on memory shortage.”h]”hXwclose a handle for a dentry (decrements the usage count). If the usage count drops to 0, and the dentry is still in its parent’s hash, the “d_deleteâ€� method is called to check whether it should be cached. If it should not be cached, or if the dentry is not hashed, it is deleted. Otherwise cached dentries are put into an LRU list to be reclaimed on memory shortage.”…”�”}”(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™h³hÇh´M‹hj\#h²hubjš)�”}”(hŒ”``d_drop`` this unhashes a dentry from its parents hash list. A subsequent call to dput() will deallocate the dentry if its usage count drops to 0 ”h]”(j )�”}”(hŒ ``d_drop``”h]”j¦)�”}”(hjÕ#h]”hŒd_drop”…”�”}”(hj×#h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjÓ#ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M�hjÏ#ubj»)�”}”(hhh]”hÞ)�”}”(hŒˆthis unhashes a dentry from its parents hash list. A subsequent call to dput() will deallocate the dentry if its usage count drops to 0”h]”hŒˆthis unhashes a dentry from its parents hash list. A subsequent call to dput() will deallocate the dentry if its usage count drops to 0”…”�”}”(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™h³hÇh´M�hj\#h²hubjš)�”}”(hŒå``d_delete`` delete a dentry. If there are no other open references to the dentry then the dentry is turned into a negative dentry (the d_iput() method is called). If there are other references, then d_drop() is called instead ”h]”(j )�”}”(hŒ ``d_delete``”h]”j¦)�”}”(hj $h]”hŒd_delete”…”�”}”(hj$h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj $ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M–hj$ubj»)�”}”(hhh]”hÞ)�”}”(hŒ×delete a dentry. If there are no other open references to the dentry then the dentry is turned into a negative dentry (the d_iput() method is called). If there are other references, then d_drop() is called instead”h]”hŒ×delete a dentry. If there are no other open references to the dentry then the dentry is turned into a negative dentry (the d_iput() method is called). If there are other references, then d_drop() is called instead”…”�”}”(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™h³hÇh´M–hj\#h²hubjš)�”}”(hŒO``d_add`` add a dentry to its parents hash list and then calls d_instantiate() ”h]”(j )�”}”(hŒ ``d_add``”h]”j¦)�”}”(hjE$h]”hŒd_add”…”�”}”(hjG$h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hjC$ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´Mšhj?$ubj»)�”}”(hhh]”hÞ)�”}”(hŒDadd a dentry to its parents hash list and then calls d_instantiate()”h]”hŒDadd a dentry to its parents hash list and then calls d_instantiate()”…”�”}”(hj]$h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M™hjZ$ubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhj?$ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´Mšhj\#h²hubjš)�”}”(hXR``d_instantiate`` add a dentry to the alias hash list for the inode and updates the "d_inode" member. The "i_count" member in the inode structure should be set/incremented. If the inode pointer is NULL, the dentry is called a "negative dentry". This function is commonly called when an inode is created for an existing negative dentry ”h]”(j )�”}”(hŒ``d_instantiate``”h]”j¦)�”}”(hj}$h]”hŒ d_instantiate”…”�”}”(hj$h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj{$ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´M¢hjw$ubj»)�”}”(hhh]”hÞ)�”}”(hX?add a dentry to the alias hash list for the inode and updates the "d_inode" member. The "i_count" member in the inode structure should be set/incremented. If the inode pointer is NULL, the dentry is called a "negative dentry". This function is commonly called when an inode is created for an existing negative dentry”h]”hXKadd a dentry to the alias hash list for the inode and updates the “d_inodeâ€� member. The “i_countâ€� member in the inode structure should be set/incremented. If the inode pointer is NULL, the dentry is called a “negative dentryâ€�. This function is commonly called when an inode is created for an existing negative dentry”…”�”}”(hj•$h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M�hj’$ubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhjw$ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´M¢hj\#h²hubjš)�”}”(hX'``d_lookup`` look up a dentry given its parent and path name component It looks up the child of that given name from the dcache hash table. If it is found, the reference count is incremented and the dentry is returned. The caller must use dput() to free the dentry when it finishes using it. ”h]”(j )�”}”(hŒ ``d_lookup``”h]”j¦)�”}”(hjµ$h]”hŒd_lookup”…”�”}”(hj·$h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j¥hj³$ubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´Mªhj¯$ubj»)�”}”(hhh]”hÞ)�”}”(hXlook up a dentry given its parent and path name component It looks up the child of that given name from the dcache hash table. If it is found, the reference count is incremented and the dentry is returned. The caller must use dput() to free the dentry when it finishes using it.”h]”hXlook up a dentry given its parent and path name component It looks up the child of that given name from the dcache hash table. If it is found, the reference count is incremented and the dentry is returned. The caller must use dput() to free the dentry when it finishes using it.”…”�”}”(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™h³hÇh´Mªhj\#h²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1j”hj=#h²hh³hÇh´Nubeh}”(h]”Œdirectory-entry-cache-api”ah ]”h"]”Œdirectory entry cache api”ah$]”h&]”uh1hÈhj©h²hh³hÇh´M|ubeh}”(h]”Œid3”ah ]”h"]”h$]”j¡ah&]”uh1hÈhhÊh²hh³hÇh´M¢j£KubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ Mount Options”h]”hŒ Mount Options”…”�”}”(hjÿ$h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjü$h²hh³hÇh´M­ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒParsing options”h]”hŒParsing options”…”�”}”(hj%h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj %h²hh³hÇh´M±ubhÞ)�”}”(hŒ—On mount and remount the filesystem is passed a string containing a comma separated list of mount options. The options can have either of these forms:”h]”hŒ—On mount and remount the filesystem is passed a string containing a comma separated list of mount options. The options can have either of these forms:”…”�”}”(hj%h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M³hj %h²hubjH)�”}”(hŒoption option=value ”h]”hÞ)�”}”(hŒoption option=value”h]”hŒoption option=value”…”�”}”(hj0%h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M·hj,%ubah}”(h]”h ]”h"]”h$]”h&]”uh1jGh³hÇh´M·hj %h²hubhÞ)�”}”(hŒ’The header defines an API that helps parse these options. There are plenty of examples on how to use it in existing filesystems.”h]”hŒ’The header defines an API that helps parse these options. There are plenty of examples on how to use it in existing filesystems.”…”�”}”(hjD%h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Mºhj %h²hubeh}”(h]”Œparsing-options”ah ]”h"]”Œparsing options”ah$]”h&]”uh1hÈhjü$h²hh³hÇh´M±ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒShowing options”h]”hŒShowing options”…”�”}”(hj]%h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjZ%h²hh³hÇh´MÀubhÞ)�”}”(hŒ~If a filesystem accepts mount options, it must define show_options() to show all the currently active options. The rules are:”h]”hŒ~If a filesystem accepts mount options, it must define show_options() to show all the currently active options. The rules are:”…”�”}”(hjk%h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MÂhjZ%h²hubjH)�”}”(hŒ«- options MUST be shown which are not default or their values differ from the default - options MAY be shown which are enabled by default or have their default value ”h]”j)�”}”(hhh]”(j )�”}”(hŒToptions MUST be shown which are not default or their values differ from the default ”h]”hÞ)�”}”(hŒSoptions MUST be shown which are not default or their values differ from the default”h]”hŒSoptions MUST be shown which are not default or their values differ from the default”…”�”}”(hj„%h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MÅhj€%ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj}%ubj )�”}”(hŒNoptions MAY be shown which are enabled by default or have their default value ”h]”hÞ)�”}”(hŒMoptions MAY be shown which are enabled by default or have their default value”h]”hŒMoptions MAY be shown which are enabled by default or have their default value”…”�”}”(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&]”j?j@uh1jh³hÇh´MÅhjy%ubah}”(h]”h ]”h"]”h$]”h&]”uh1jGh³hÇh´MÅhjZ%h²hubhÞ)�”}”(hŒåOptions used only internally between a mount helper and the kernel (such as file descriptors), or which only have an effect during the mounting (such as ones controlling the creation of a journal) are exempt from the above rules.”h]”hŒåOptions used only internally between a mount helper and the kernel (such as file descriptors), or which only have an effect during the mounting (such as ones controlling the creation of a journal) are exempt from the above rules.”…”�”}”(hj¼%h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MËhjZ%h²hubhÞ)�”}”(hŒ¸The underlying reason for the above rules is to make sure, that a mount can be accurately replicated (e.g. umounting and mounting again) based on the information found in /proc/mounts.”h]”hŒ¸The underlying reason for the above rules is to make sure, that a mount can be accurately replicated (e.g. umounting and mounting again) based on the information found in /proc/mounts.”…”�”}”(hjÊ%h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MÐhjZ%h²hubeh}”(h]”Œshowing-options”ah ]”h"]”Œshowing options”ah$]”h&]”uh1hÈhjü$h²hh³hÇh´MÀubeh}”(h]”Œ mount-options”ah ]”h"]”Œ mount options”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´M­ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ Resources”h]”hŒ Resources”…”�”}”(hjë%h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjè%h²hh³hÇh´MÖubj•)�”}”(hhh]”(jš)�”}”(hŒR(Note some of these resources are not up-to-date with the latest kernel version.) ”h]”(j )�”}”(hŒG(Note some of these resources are not up-to-date with the latest kernel”h]”hŒG(Note some of these resources are not up-to-date with the latest kernel”…”�”}”(hj&h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´MÙhjü%ubj»)�”}”(hhh]”hÞ)�”}”(hŒ version.)”h]”hŒ version.)”…”�”}”(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™h³hÇh´MÙhjù%ubjš)�”}”(hŒKCreating Linux virtual filesystems. 2002 ”h]”(j )�”}”(hŒ(Creating Linux virtual filesystems. 2002”h]”hŒ(Creating Linux virtual filesystems. 2002”…”�”}”(hj/&h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´MÜhj+&ubj»)�”}”(hhh]”hÞ)�”}”(hŒ!”h]”(hŒ<”…”�”}”(hj@&h²hh³Nh´Nubhè)�”}”(hŒhttps://lwn.net/Articles/13325/”h]”hŒhttps://lwn.net/Articles/13325/”…”�”}”(hjH&h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”jJ&uh1hçhj@&ubhŒ>”…”�”}”(hj@&h²hh³Nh´Nubeh}”(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™h³hÇh´MÜhjù%h²hubjš)�”}”(hŒzThe Linux Virtual File-system Layer by Neil Brown. 1999 ”h]”(j )�”}”(hŒ7The Linux Virtual File-system Layer by Neil Brown. 1999”h]”hŒ7The Linux Virtual File-system Layer by Neil Brown. 1999”…”�”}”(hjq&h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´Mßhjm&ubj»)�”}”(hhh]”hÞ)�”}”(hŒA”h]”(hŒ<”…”�”}”(hj‚&h²hh³Nh´Nubhè)�”}”(hŒ?http://www.cse.unsw.edu.au/~neilb/oss/linux-commentary/vfs.html”h]”hŒ?http://www.cse.unsw.edu.au/~neilb/oss/linux-commentary/vfs.html”…”�”}”(hjŠ&h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”jŒ&uh1hçhj‚&ubhŒ>”…”�”}”(hj‚&h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Mßhj&ubah}”(h]”h ]”h"]”h$]”h&]”uh1jºhjm&ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j™h³hÇh´Mßhjù%h²hubjš)�”}”(hŒqA tour of the Linux VFS by Michael K. Johnson. 1996 ”h]”(j )�”}”(hŒ3A tour of the Linux VFS by Michael K. Johnson. 1996”h]”hŒ3A tour of the Linux VFS by Michael K. Johnson. 1996”…”�”}”(hj³&h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´Mâhj¯&ubj»)�”}”(hhh]”hÞ)�”}”(hŒ<”h]”(hŒ<”…”�”}”(hjÄ&h²hh³Nh´Nubhè)�”}”(hŒ:https://www.tldp.org/LDP/khg/HyperNews/get/fs/vfstour.html”h]”hŒ:https://www.tldp.org/LDP/khg/HyperNews/get/fs/vfstour.html”…”�”}”(hjÌ&h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”jÎ&uh1hçhjÄ&ubhŒ>”…”�”}”(hjÄ&h²hh³Nh´Nubeh}”(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™h³hÇh´Mâhjù%h²hubjš)�”}”(hŒrA small trail through the Linux kernel by Andries Brouwer. 2001 ”h]”(j )�”}”(hŒ?A small trail through the Linux kernel by Andries Brouwer. 2001”h]”hŒ?A small trail through the Linux kernel by Andries Brouwer. 2001”…”�”}”(hjõ&h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jŸh³hÇh´Mähjñ&ubj»)�”}”(hhh]”hÞ)�”}”(hŒ2”h]”(hŒ<”…”�”}”(hj'h²hh³Nh´Nubhè)�”}”(hŒ0https://www.win.tue.nl/~aeb/linux/vfs/trail.html”h]”hŒ0https://www.win.tue.nl/~aeb/linux/vfs/trail.html”…”�”}”(hj'h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”j'uh1hçhj'ubhŒ>”…”�”}”(hj'h²hh³Nh´Nubeh}”(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™h³hÇh´Mähjù%h²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1j”hjè%h²hh³hÇh´Nubeh}”(h]”Œ resources”ah ]”h"]”Œ resources”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´MÖubeh}”(h]”Œ)overview-of-the-linux-virtual-file-system”ah ]”h"]”Œ)overview of the linux virtual file system”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”Œentry”Œ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”jl'Œ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”}”(jF'jC'jjŒdirectory entry cache (dcache)”NŒthe inode object”NŒthe file object”NjŽj‹j†jƒj j j” j‘ jü jù j§j¤j»j¸jÆjÃj³j°jŸjœj:#j7#jò$jï$jå%jâ%jW%jT%jÝ%jÚ%j>'j;'uŒ nametypes”}”(jF'‰j‰j°'‰j±'‰j²'‰jމj†‰j ‰j” ‰jü ‰j§‰j»‰jƉj³‰jŸ‰j:#‰jò$‰jå%‰jW%‰jÝ%‰j>'‰uh}”(jC'hÊjjAj�jnjÓj¤jjÙj‹jjƒjfj j‘j‘ j°jù j— j¬j j¤j& j¸j±jÃjxj°jÉj¤j¾jœjÝj÷$j©j7#jºjï$j=#jâ%jü$jT%j %jÚ%jZ%j;'jè%uŒ 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”“”}”jz'Ks…”R”Œparse_messages”]”(hŒsystem_message”“”)�”}”(hhh]”hÞ)�”}”(hŒ3Duplicate implicit target name: "the inode object".”h]”hŒ7Duplicate implicit target name: “the inode objectâ€�.”…”�”}”(hjÖ'h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝhjÓ'ubah}”(h]”h ]”h"]”h$]”h&]”j¬aŒlevel”KŒtype”ŒINFO”Œsource”hÇŒline”M”uh1jÑ'hj h²hh³hÇh´M”ubjÒ')�”}”(hhh]”hÞ)�”}”(hŒ2Duplicate implicit target name: "the file object".”h]”hŒ6Duplicate implicit target name: “the file objectâ€�.”…”�”}”(hjò'h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝhjï'ubah}”(h]”h ]”h"]”h$]”h&]”j¤aŒlevel”KŒtype”jì'Œsource”hÇŒline”MÛuh1jÑ'hj¾h²hh³hÇh´MÛubjÒ')�”}”(hhh]”hÞ)�”}”(hŒADuplicate implicit target name: "directory entry cache (dcache)".”h]”hŒEDuplicate implicit target name: “directory entry cache (dcache)â€�.”…”�”}”(hj (h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝhj (ubah}”(h]”h ]”h"]”h$]”h&]”j÷$aŒlevel”KŒtype”jì'Œsource”hÇŒline”M¢uh1jÑ'hj©h²hh³hÇh´M¢ubeŒtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.