sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget'/translations/zh_CN/filesystems/lockingmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/zh_TW/filesystems/lockingmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/it_IT/filesystems/lockingmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/ja_JP/filesystems/lockingmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/ko_KR/filesystems/lockingmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/sp_SP/filesystems/lockingmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(hLockingh]hLocking}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhA/var/lib/git/docbuild/linux/Documentation/filesystems/locking.rsthKubh paragraph)}(hXThe text below describes the locking rules for VFS-related methods. It is (believed to be) up-to-date. *Please*, if you change anything in prototypes or locking protocols - update this file. And update the relevant instances in the tree, don't leave that to maintainers of filesystems/devices/ etc. At the very least, put the list of dubious cases in the end of this file. Don't turn it into log - maintainers of out-of-the-tree code are supposed to be able to use diff(1).h](hgThe text below describes the locking rules for VFS-related methods. It is (believed to be) up-to-date. }(hhhhhNhNubhemphasis)}(h*Please*h]hPlease}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubhXn, if you change anything in prototypes or locking protocols - update this file. And update the relevant instances in the tree, don’t leave that to maintainers of filesystems/devices/ etc. At the very least, put the list of dubious cases in the end of this file. Don’t turn it into log - maintainers of out-of-the-tree code are supposed to be able to use diff(1).}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(h8Thing currently missing here: socket operations. Alexey?h]h8Thing currently missing here: socket operations. Alexey?}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hhh](h)}(hdentry_operationsh]hdentry_operations}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(h prototypes::h]h prototypes:}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh literal_block)}(hX$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)(struct dentry *); int (*d_init)(struct dentry *); void (*d_release)(struct dentry *); void (*d_iput)(struct dentry *, struct inode *); char *(*d_dname)((struct dentry *dentry, char *buffer, int buflen); struct vfsmount *(*d_automount)(struct path *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$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)(struct dentry *); int (*d_init)(struct dentry *); void (*d_release)(struct dentry *); void (*d_iput)(struct dentry *, struct inode *); char *(*d_dname)((struct dentry *dentry, char *buffer, int buflen); struct vfsmount *(*d_automount)(struct path *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&] xml:spacepreserveuh1jhhhKhhhhubh)}(hlocking rules:h]hlocking rules:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK%hhhhubhtable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j2hj/ubj3)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1j2hj/ubj3)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j2hj/ubj3)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j2hj/ubj3)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j2hj/ubhthead)}(hhh]hrow)}(hhh](hentry)}(hhh]h)}(hopsh]hops}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK(hjrubah}(h]h ]h"]h$]h&]uh1jphjmubjq)}(hhh]h)}(h rename_lockh]h rename_lock}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK(hjubah}(h]h ]h"]h$]h&]uh1jphjmubjq)}(hhh]h)}(h->d_lockh]h->d_lock}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK(hjubah}(h]h ]h"]h$]h&]uh1jphjmubjq)}(hhh]h)}(h may blockh]h may block}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK(hjubah}(h]h ]h"]h$]h&]uh1jphjmubjq)}(hhh]h)}(hrcu-walkh]hrcu-walk}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK(hjubah}(h]h ]h"]h$]h&]uh1jphjmubeh}(h]h ]h"]h$]h&]uh1jkhjhubah}(h]h ]h"]h$]h&]uh1jfhj/ubhtbody)}(hhh](jl)}(hhh](jq)}(hhh]h)}(h d_revalidate:h]h d_revalidate:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK*hjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(hnoh]hno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK*hjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(hnoh]hno}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK*hj'ubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(hyes (ref-walk)h]hyes (ref-walk)}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK*hj>ubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(hmaybeh]hmaybe}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK*hjUubah}(h]h ]h"]h$]h&]uh1jphjubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(hd_weak_revalidate:h]hd_weak_revalidate:}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hjuubah}(h]h ]h"]h$]h&]uh1jphjrubjq)}(hhh]h)}(hnoh]hno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hjubah}(h]h ]h"]h$]h&]uh1jphjrubjq)}(hhh]h)}(hnoh]hno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hjubah}(h]h ]h"]h$]h&]uh1jphjrubjq)}(hhh]h)}(hyesh]hyes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hjubah}(h]h ]h"]h$]h&]uh1jphjrubjq)}(hhh]h)}(hnoh]hno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hjubah}(h]h ]h"]h$]h&]uh1jphjrubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(hd_hashh]hd_hash}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK,hjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(hnoh]hno}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK,hjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(hnoh]hno}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK,hjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(hnoh]hno}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK,hj6ubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(hmaybeh]hmaybe}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK,hjMubah}(h]h ]h"]h$]h&]uh1jphjubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(h d_compare:h]h d_compare:}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK-hjmubah}(h]h ]h"]h$]h&]uh1jphjjubjq)}(hhh]h)}(hyesh]hyes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK-hjubah}(h]h ]h"]h$]h&]uh1jphjjubjq)}(hhh]h)}(hnoh]hno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK-hjubah}(h]h ]h"]h$]h&]uh1jphjjubjq)}(hhh]h)}(hnoh]hno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK-hjubah}(h]h ]h"]h$]h&]uh1jphjjubjq)}(hhh]h)}(hmaybeh]hmaybe}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK-hjubah}(h]h ]h"]h$]h&]uh1jphjjubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(h d_delete:h]h d_delete:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK.hjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(hnoh]hno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK.hjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(hyesh]hyes}(hjhhhNhNubah}(h]h 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hhh]h)}(h d_manage:h]h d_manage:}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK5hjMubah}(h]h ]h"]h$]h&]uh1jphjJubjq)}(hhh]h)}(hnoh]hno}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK5hjdubah}(h]h ]h"]h$]h&]uh1jphjJubjq)}(hhh]h)}(hnoh]hno}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK5hj{ubah}(h]h ]h"]h$]h&]uh1jphjJubjq)}(hhh]h)}(hyes (ref-walk)h]hyes (ref-walk)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK5hjubah}(h]h ]h"]h$]h&]uh1jphjJubjq)}(hhh]h)}(hmaybeh]hmaybe}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK5hjubah}(h]h ]h"]h$]h&]uh1jphjJubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(hd_realh]hd_real}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK6hjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(hnoh]hno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK6hjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(hnoh]hno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK6hjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(hyesh]hyes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK6hjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(hnoh]hno}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK6hj%ubah}(h]h ]h"]h$]h&]uh1jphjubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(hd_unalias_trylockh]hd_unalias_trylock}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK7hjEubah}(h]h ]h"]h$]h&]uh1jphjBubjq)}(hhh]h)}(hyesh]hyes}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK7hj\ubah}(h]h ]h"]h$]h&]uh1jphjBubjq)}(hhh]h)}(hnoh]hno}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK7hjsubah}(h]h ]h"]h$]h&]uh1jphjBubjq)}(hhh]h)}(hnoh]hno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK7hjubah}(h]h ]h"]h$]h&]uh1jphjBubjq)}(hhh]h)}(hnoh]hno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK7hjubah}(h]h ]h"]h$]h&]uh1jphjBubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(hd_unalias_unlockh]hd_unalias_unlock}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK8hjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(hyesh]hyes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK8hjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(hnoh]hno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK8hjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(hnoh]hno}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK8hj ubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(hnoh]hno}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK8hj ubah}(h]h ]h"]h$]h&]uh1jphjubeh}(h]h ]h"]h$]h&]uh1jkhjubeh}(h]h ]h"]h$]h&]uh1jhj/ubeh}(h]h ]h"]h$]h&]colsKuh1j-hj*ubah}(h]h ]h"]h$]h&]uh1j(hhhhhhhNubeh}(h]dentry-operationsah ]h"]dentry_operationsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hinode_operationsh]hinode_operations}(hjX hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjU hhhhhKhjU hhubj )}(hXint (*create) (struct mnt_idmap *, struct inode *,struct dentry *,umode_t, bool); 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 *); void (*truncate) (struct inode *); int (*permission) (struct mnt_idmap *, struct inode *, int, unsigned 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); int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, u64 len); void (*update_time)(struct inode *, struct timespec *, int); 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); int (*fileattr_set)(struct mnt_idmap *idmap, struct dentry *dentry, struct fileattr *fa); int (*fileattr_get)(struct dentry *dentry, struct fileattr *fa); struct posix_acl * (*get_acl)(struct mnt_idmap *, struct dentry *, int); struct offset_ctx *(*get_offset_ctx)(struct inode *inode);h]hXint (*create) (struct mnt_idmap *, struct inode *,struct dentry *,umode_t, bool); 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 *); void (*truncate) (struct inode *); int (*permission) (struct mnt_idmap *, struct inode *, int, unsigned 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); int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, u64 len); void (*update_time)(struct inode *, struct timespec *, int); 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); int (*fileattr_set)(struct mnt_idmap *idmap, struct dentry *dentry, struct fileattr *fa); int (*fileattr_get)(struct dentry *dentry, struct fileattr *fa); struct posix_acl * (*get_acl)(struct mnt_idmap *, struct dentry *, int); struct offset_ctx *(*get_offset_ctx)(struct inode *inode);}hjt sbah}(h]h ]h"]h$]h&]jjuh1jhhhK@hjU hhubhdefinition_list)}(hhh]hdefinition_list_item)}(hlocking rules: all may block h](hterm)}(hlocking rules:h]hlocking rules:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j hhhK`hj ubh definition)}(hhh]h)}(h all may blockh]h all may block}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK`hj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hhhK`hj ubah}(h]h ]h"]h$]h&]uh1j hjU hhhhhNubj))}(hhh]j.)}(hhh](j3)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j2hj ubj3)}(hhh]h}(h]h ]h"]h$]h&]colwidthK3uh1j2hj ubjg)}(hhh]jl)}(hhh](jq)}(hhh]h)}(hopsh]hops}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKchj ubah}(h]h ]h"]h$]h&]uh1jphj ubjq)}(hhh]h)}(hi_rwsem(inode)h]hi_rwsem(inode)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKchj ubah}(h]h ]h"]h$]h&]uh1jphj ubeh}(h]h ]h"]h$]h&]uh1jkhj ubah}(h]h ]h"]h$]h&]uh1jfhj ubj)}(hhh](jl)}(hhh](jq)}(hhh]h)}(hlookup:h]hlookup:}(hj% hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKehj" ubah}(h]h ]h"]h$]h&]uh1jphj ubjq)}(hhh]h)}(hsharedh]hshared}(hj< hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKehj9 ubah}(h]h ]h"]h$]h&]uh1jphj ubeh}(h]h ]h"]h$]h&]uh1jkhj ubjl)}(hhh](jq)}(hhh]h)}(hcreate:h]hcreate:}(hj\ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKfhjY ubah}(h]h ]h"]h$]h&]uh1jphjV ubjq)}(hhh]h)}(h exclusiveh]h exclusive}(hjs hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKfhjp ubah}(h]h ]h"]h$]h&]uh1jphjV ubeh}(h]h ]h"]h$]h&]uh1jkhj ubjl)}(hhh](jq)}(hhh]h)}(hlink:h]hlink:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKghj ubah}(h]h ]h"]h$]h&]uh1jphj ubjq)}(hhh]h)}(hexclusive (both)h]hexclusive (both)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKghj ubah}(h]h ]h"]h$]h&]uh1jphj ubeh}(h]h ]h"]h$]h&]uh1jkhj ubjl)}(hhh](jq)}(hhh]h)}(hmknod:h]hmknod:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhj ubah}(h]h ]h"]h$]h&]uh1jphj ubjq)}(hhh]h)}(h exclusiveh]h exclusive}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhj ubah}(h]h ]h"]h$]h&]uh1jphj ubeh}(h]h ]h"]h$]h&]uh1jkhj ubjl)}(hhh](jq)}(hhh]h)}(hsymlink:h]hsymlink:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKihj ubah}(h]h ]h"]h$]h&]uh1jphj ubjq)}(hhh]h)}(h exclusiveh]h exclusive}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKihj ubah}(h]h ]h"]h$]h&]uh1jphj ubeh}(h]h ]h"]h$]h&]uh1jkhj ubjl)}(hhh](jq)}(hhh]h)}(hmkdir:h]hmkdir:}(hj8 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKjhj5 ubah}(h]h ]h"]h$]h&]uh1jphj2 ubjq)}(hhh]h)}(h exclusiveh]h exclusive}(hjO hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKjhjL ubah}(h]h ]h"]h$]h&]uh1jphj2 ubeh}(h]h ]h"]h$]h&]uh1jkhj ubjl)}(hhh](jq)}(hhh]h)}(hunlink:h]hunlink:}(hjo hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKkhjl ubah}(h]h ]h"]h$]h&]uh1jphji ubjq)}(hhh]h)}(hexclusive (both)h]hexclusive (both)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKkhj ubah}(h]h ]h"]h$]h&]uh1jphji ubeh}(h]h ]h"]h$]h&]uh1jkhj ubjl)}(hhh](jq)}(hhh]h)}(hrmdir:h]hrmdir:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKlhj ubah}(h]h ]h"]h$]h&]uh1jphj ubjq)}(hhh]h)}(hexclusive (both)(see below)h]hexclusive (both)(see below)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKlhj ubah}(h]h ]h"]h$]h&]uh1jphj ubeh}(h]h ]h"]h$]h&]uh1jkhj ubjl)}(hhh](jq)}(hhh]h)}(hrename:h]hrename:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKmhj ubah}(h]h ]h"]h$]h&]uh1jphj ubjq)}(hhh]h)}(h3exclusive (both parents, some children) (see below)h]h3exclusive (both parents, some children) (see below)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKmhj ubah}(h]h ]h"]h$]h&]uh1jphj ubeh}(h]h ]h"]h$]h&]uh1jkhj ubjl)}(hhh](jq)}(hhh]h)}(h readlink:h]h readlink:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKnhj ubah}(h]h ]h"]h$]h&]uh1jphj ubjq)}(hhh]h)}(hnoh]hno}(hj+ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKnhj( ubah}(h]h ]h"]h$]h&]uh1jphj ubeh}(h]h ]h"]h$]h&]uh1jkhj ubjl)}(hhh](jq)}(hhh]h)}(h get_link:h]h get_link:}(hjK hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKohjH ubah}(h]h ]h"]h$]h&]uh1jphjE ubjq)}(hhh]h)}(hnoh]hno}(hjb hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKohj_ ubah}(h]h ]h"]h$]h&]uh1jphjE ubeh}(h]h ]h"]h$]h&]uh1jkhj ubjl)}(hhh](jq)}(hhh]h)}(hsetattr:h]hsetattr:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKphj ubah}(h]h ]h"]h$]h&]uh1jphj| ubjq)}(hhh]h)}(h exclusiveh]h exclusive}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKphj ubah}(h]h ]h"]h$]h&]uh1jphj| ubeh}(h]h ]h"]h$]h&]uh1jkhj ubjl)}(hhh](jq)}(hhh]h)}(h permission:h]h permission:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKqhj ubah}(h]h ]h"]h$]h&]uh1jphj ubjq)}(hhh]h)}(h-no (may not block if called in rcu-walk mode)h]h-no (may not block if called in rcu-walk mode)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKqhj ubah}(h]h ]h"]h$]h&]uh1jphj ubeh}(h]h ]h"]h$]h&]uh1jkhj ubjl)}(hhh](jq)}(hhh]h)}(hget_inode_acl:h]hget_inode_acl:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKrhj ubah}(h]h ]h"]h$]h&]uh1jphj ubjq)}(hhh]h)}(hnoh]hno}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKrhj ubah}(h]h ]h"]h$]h&]uh1jphj ubeh}(h]h ]h"]h$]h&]uh1jkhj ubjl)}(hhh](jq)}(hhh]h)}(hget_acl:h]hget_acl:}(hj' hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKshj$ ubah}(h]h ]h"]h$]h&]uh1jphj! ubjq)}(hhh]h)}(hnoh]hno}(hj> hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKshj; ubah}(h]h ]h"]h$]h&]uh1jphj! ubeh}(h]h ]h"]h$]h&]uh1jkhj ubjl)}(hhh](jq)}(hhh]h)}(hgetattr:h]hgetattr:}(hj^ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKthj[ ubah}(h]h ]h"]h$]h&]uh1jphjX ubjq)}(hhh]h)}(hnoh]hno}(hju hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKthjr ubah}(h]h ]h"]h$]h&]uh1jphjX ubeh}(h]h ]h"]h$]h&]uh1jkhj ubjl)}(hhh](jq)}(hhh]h)}(h listxattr:h]h listxattr:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKuhj ubah}(h]h ]h"]h$]h&]uh1jphj ubjq)}(hhh]h)}(hnoh]hno}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKuhj ubah}(h]h ]h"]h$]h&]uh1jphj ubeh}(h]h ]h"]h$]h&]uh1jkhj ubjl)}(hhh](jq)}(hhh]h)}(hfiemap:h]hfiemap:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKvhj ubah}(h]h ]h"]h$]h&]uh1jphj ubjq)}(hhh]h)}(hnoh]hno}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKvhj ubah}(h]h ]h"]h$]h&]uh1jphj ubeh}(h]h ]h"]h$]h&]uh1jkhj ubjl)}(hhh](jq)}(hhh]h)}(h update_time:h]h update_time:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKwhjubah}(h]h ]h"]h$]h&]uh1jphj ubjq)}(hhh]h)}(hnoh]hno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKwhjubah}(h]h ]h"]h$]h&]uh1jphj ubeh}(h]h ]h"]h$]h&]uh1jkhj ubjl)}(hhh](jq)}(hhh]h)}(h atomic_open:h]h atomic_open:}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKxhj7ubah}(h]h ]h"]h$]h&]uh1jphj4ubjq)}(hhh]h)}(h2shared (exclusive if O_CREAT is set in open flags)h]h2shared (exclusive if O_CREAT is set in open flags)}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKxhjNubah}(h]h ]h"]h$]h&]uh1jphj4ubeh}(h]h ]h"]h$]h&]uh1jkhj ubjl)}(hhh](jq)}(hhh]h)}(htmpfile:h]htmpfile:}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKyhjnubah}(h]h ]h"]h$]h&]uh1jphjkubjq)}(hhh]h)}(hnoh]hno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKyhjubah}(h]h ]h"]h$]h&]uh1jphjkubeh}(h]h ]h"]h$]h&]uh1jkhj ubjl)}(hhh](jq)}(hhh]h)}(h fileattr_get:h]h fileattr_get:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKzhjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(hno or exclusiveh]hno or exclusive}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKzhjubah}(h]h ]h"]h$]h&]uh1jphjubeh}(h]h ]h"]h$]h&]uh1jkhj ubjl)}(hhh](jq)}(hhh]h)}(h fileattr_set:h]h fileattr_set:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK{hjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(h exclusiveh]h exclusive}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK{hjubah}(h]h ]h"]h$]h&]uh1jphjubeh}(h]h ]h"]h$]h&]uh1jkhj ubjl)}(hhh](jq)}(hhh]h)}(hget_offset_ctxh]hget_offset_ctx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK|hjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(hnoh]hno}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK|hj*ubah}(h]h ]h"]h$]h&]uh1jphjubeh}(h]h ]h"]h$]h&]uh1jkhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]colsKuh1j-hj ubah}(h]h ]h"]h$]h&]uh1j(hjU hhhhhNubh block_quote)}(hX;Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_rwsem exclusive on victim. cross-directory ->rename() has (per-superblock) ->s_vfs_rename_sem. ->unlink() and ->rename() have ->i_rwsem exclusive on all non-directories involved. ->rename() has ->i_rwsem exclusive on any subdirectory that changes parent. h]h)}(hX:Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_rwsem exclusive on victim. cross-directory ->rename() has (per-superblock) ->s_vfs_rename_sem. ->unlink() and ->rename() have ->i_rwsem exclusive on all non-directories involved. ->rename() has ->i_rwsem exclusive on any subdirectory that changes parent.h]hX:Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_rwsem exclusive on victim. cross-directory ->rename() has (per-superblock) ->s_vfs_rename_sem. ->unlink() and ->rename() have ->i_rwsem exclusive on all non-directories involved. ->rename() has ->i_rwsem exclusive on any subdirectory that changes parent.}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj\ubah}(h]h ]h"]h$]h&]uh1jZhhhKhjU hhubh)}(hSee Documentation/filesystems/directory-locking.rst for more detailed discussion of the locking scheme for directory operations.h]hSee Documentation/filesystems/directory-locking.rst for more detailed discussion of the locking scheme for directory operations.}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjU hhubeh}(h]inode-operationsah ]h"]inode_operationsah$]h&]uh1hhhhhhhhKi_lock!!!h]h!!!inode->i_lock!!!}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jphjubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(h evict_inode:h]h evict_inode:}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj:ubah}(h]h ]h"]h$]h&]uh1jphj7ubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphj7ubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphj7ubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(h put_super:h]h put_super:}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjlubah}(h]h ]h"]h$]h&]uh1jphjiubjq)}(hhh]h)}(hwriteh]hwrite}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jphjiubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphjiubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(hsync_fs:h]hsync_fs:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(hreadh]hread}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphjubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(h freeze_fs:h]h freeze_fs:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(hwriteh]hwrite}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphjubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(h unfreeze_fs:h]h unfreeze_fs:}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj,ubah}(h]h ]h"]h$]h&]uh1jphj)ubjq)}(hhh]h)}(hwriteh]hwrite}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjCubah}(h]h ]h"]h$]h&]uh1jphj)ubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphj)ubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(hstatfs:h]hstatfs:}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjlubah}(h]h ]h"]h$]h&]uh1jphjiubjq)}(hhh]h)}(h maybe(read)h]h maybe(read)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jphjiubjq)}(hhh]h)}(h (see below)h]h (see below)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jphjiubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(h remount_fs:h]h remount_fs:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(hwriteh]hwrite}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphjubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(h umount_begin:h]h umount_begin:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(hnoh]hno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphjubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(h show_options:h]h show_options:}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj:ubah}(h]h ]h"]h$]h&]uh1jphj7ubjq)}(hhh]h)}(hnoh]hno}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjQubah}(h]h ]h"]h$]h&]uh1jphj7ubjq)}(hhh]h)}(h(namespace_sem)h]h(namespace_sem)}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhubah}(h]h ]h"]h$]h&]uh1jphj7ubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(h quota_read:h]h quota_read:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(hnoh]hno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(h (see below)h]h (see below)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jphjubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(h quota_write:h]h quota_write:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(hnoh]hno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(h (see below)h]h (see below)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jphjubeh}(h]h ]h"]h$]h&]uh1jkhjubeh}(h]h ]h"]h$]h&]uh1jhjtubeh}(h]h ]h"]h$]h&]colsKuh1j-hjqubah}(h]h ]h"]h$]h&]uh1j(hj hhhhhNubh)}(hX->statfs() has s_umount (shared) when called by ustat(2) (native or compat), but that's an accident of bad API; s_umount is used to pin the superblock down when we only have dev_t given us by userland to identify the superblock. Everything else (statfs(), fstatfs(), etc.) doesn't hold it when calling ->statfs() - superblock is pinned down by resolving the pathname passed to syscall.h]hX->statfs() has s_umount (shared) when called by ustat(2) (native or compat), but that’s an accident of bad API; s_umount is used to pin the superblock down when we only have dev_t given us by userland to identify the superblock. Everything else (statfs(), fstatfs(), etc.) doesn’t hold it when calling ->statfs() - superblock is pinned down by resolving the pathname passed to syscall.}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hX3->quota_read() and ->quota_write() functions are both guaranteed to be the only ones operating on the quota file by the quota code (via dqio_sem) (unless an admin really wants to screw up something and writes to quota files with quotas on). For other details about locking see also dquot_operations section.h]hX3->quota_read() and ->quota_write() functions are both guaranteed to be the only ones operating on the quota file by the quota code (via dqio_sem) (unless an admin really wants to screw up something and writes to quota files with quotas on). For other details about locking see also dquot_operations section.}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubeh}(h]super-operationsah ]h"]super_operationsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hfile_system_typeh]hfile_system_type}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjXhhhhhKubh)}(h prototypes::h]h prototypes:}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjXhhubj )}(hstruct dentry *(*mount) (struct file_system_type *, int, const char *, void *); void (*kill_sb) (struct super_block *);h]hstruct dentry *(*mount) (struct file_system_type *, int, const char *, void *); void (*kill_sb) (struct super_block *);}hjwsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjXhhubh)}(hlocking rules:h]hlocking rules:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjXhhubj))}(hhh]j.)}(hhh](j3)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j2hjubj3)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1j2hjubjg)}(hhh]jl)}(hhh](jq)}(hhh]h)}(hopsh]hops}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(h may blockh]h may block}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jphjubeh}(h]h ]h"]h$]h&]uh1jkhjubah}(h]h ]h"]h$]h&]uh1jfhjubj)}(hhh](jl)}(hhh](jq)}(hhh]h)}(hmounth]hmount}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(hyesh]hyes}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jphjubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(hkill_sbh]hkill_sb}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj*ubah}(h]h ]h"]h$]h&]uh1jphj'ubjq)}(hhh]h)}(hyesh]hyes}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjAubah}(h]h ]h"]h$]h&]uh1jphj'ubeh}(h]h ]h"]h$]h&]uh1jkhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1j-hjubah}(h]h ]h"]h$]h&]uh1j(hjXhhhhhNubh)}(hX->mount() returns ERR_PTR or the root dentry; its superblock should be locked on return.h]hX->mount() returns ERR_PTR or the root dentry; its superblock should be locked on return.}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjXhhubh)}(hk->kill_sb() takes a write-locked superblock, does all shutdown work on it, unlocks and drops the reference.h]hk->kill_sb() takes a write-locked superblock, does all shutdown work on it, unlocks and drops the reference.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjXhhubeh}(h]file-system-typeah ]h"]file_system_typeah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(haddress_space_operationsh]haddress_space_operations}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(h prototypes::h]h prototypes:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj )}(hXint (*writepage)(struct page *page, struct writeback_control *wbc); int (*read_folio)(struct file *, struct folio *); int (*writepages)(struct address_space *, struct writeback_control *); bool (*dirty_folio)(struct address_space *, struct folio *folio); void (*readahead)(struct readahead_control *); int (*write_begin)(struct file *, struct address_space *mapping, loff_t pos, unsigned len, struct folio **foliop, void **fsdata); int (*write_end)(struct file *, 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 *); int (*direct_IO)(struct kiocb *, struct iov_iter *iter); int (*migrate_folio)(struct address_space *, 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); int (*error_remove_folio)(struct address_space *, struct folio *); int (*swap_activate)(struct swap_info_struct *sis, struct file *f, sector_t *span) int (*swap_deactivate)(struct file *); int (*swap_rw)(struct kiocb *iocb, struct iov_iter *iter);h]hXint (*writepage)(struct page *page, struct writeback_control *wbc); int (*read_folio)(struct file *, struct folio *); int (*writepages)(struct address_space *, struct writeback_control *); bool (*dirty_folio)(struct address_space *, struct folio *folio); void (*readahead)(struct readahead_control *); int (*write_begin)(struct file *, struct address_space *mapping, loff_t pos, unsigned len, struct folio **foliop, void **fsdata); int (*write_end)(struct file *, 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 *); int (*direct_IO)(struct kiocb *, struct iov_iter *iter); int (*migrate_folio)(struct address_space *, 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); int (*error_remove_folio)(struct address_space *, struct folio *); int (*swap_activate)(struct swap_info_struct *sis, struct file *f, sector_t *span) int (*swap_deactivate)(struct file *); int (*swap_rw)(struct kiocb *iocb, struct iov_iter *iter);}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjhhubj )}(hhh]j )}(h?locking rules: All except dirty_folio and free_folio may block h](j )}(hlocking rules:h]hlocking rules:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hhhMhjubj )}(hhh]h)}(h/All except dirty_folio and free_folio may blockh]h/All except dirty_folio and free_folio may block}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1j hhhMhjubah}(h]h ]h"]h$]h&]uh1j hjhhhhhNubj))}(hhh]j.)}(hhh](j3)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j2hjubj3)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j2hjubj3)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1j2hjubj3)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j2hjubjg)}(hhh]jl)}(hhh](jq)}(hhh]h)}(hopsh]hops}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj.ubah}(h]h ]h"]h$]h&]uh1jphj+ubjq)}(hhh]h)}(h folio lockedh]h folio locked}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjEubah}(h]h ]h"]h$]h&]uh1jphj+ubjq)}(hhh]h)}(hi_rwsemh]hi_rwsem}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj\ubah}(h]h ]h"]h$]h&]uh1jphj+ubjq)}(hhh]h)}(hinvalidate_lockh]hinvalidate_lock}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjsubah}(h]h ]h"]h$]h&]uh1jphj+ubeh}(h]h ]h"]h$]h&]uh1jkhj(ubah}(h]h ]h"]h$]h&]uh1jfhjubj)}(hhh](jl)}(hhh](jq)}(hhh]h)}(h writepage:h]h writepage:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(hyes, unlocks (see below)h]hyes, unlocks (see below)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphjubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(h read_folio:h]h read_folio:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(h yes, unlocksh]h yes, unlocks}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(hsharedh]hshared}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jphjubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(h writepages:h]h writepages:}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj<ubah}(h]h ]h"]h$]h&]uh1jphj9ubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphj9ubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphj9ubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphj9ubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(h dirty_folio:h]h dirty_folio:}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjwubah}(h]h ]h"]h$]h&]uh1jphjtubjq)}(hhh]h)}(hmaybeh]hmaybe}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jphjtubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphjtubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphjtubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(h readahead:h]h readahead:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(h yes, unlocksh]h yes, unlocks}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(hsharedh]hshared}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jphjubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(h write_begin:h]h write_begin:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(hlocks the folioh]hlocks the folio}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj.ubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(h exclusiveh]h exclusive}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjEubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphjubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(h write_end:h]h write_end:}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjnubah}(h]h ]h"]h$]h&]uh1jphjkubjq)}(hhh]h)}(h yes, unlocksh]h yes, unlocks}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjubah}(h]h ]h"]h$]h&]uh1jphjkubjq)}(hhh]h)}(h exclusiveh]h exclusive}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjubah}(h]h ]h"]h$]h&]uh1jphjkubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphjkubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(hbmap:h]hbmap:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphjubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(hinvalidate_folio:h]hinvalidate_folio:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(hyesh]hyes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(h exclusiveh]h exclusive}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hj7ubah}(h]h ]h"]h$]h&]uh1jphjubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(hrelease_folio:h]hrelease_folio:}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM$hjWubah}(h]h ]h"]h$]h&]uh1jphjTubjq)}(hhh]h)}(hyesh]hyes}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM$hjnubah}(h]h ]h"]h$]h&]uh1jphjTubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphjTubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphjTubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(h free_folio:h]h free_folio:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM%hjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(hyesh]hyes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM%hjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphjubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(h direct_IO:h]h direct_IO:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM&hjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphjubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(hmigrate_folio:h]hmigrate_folio:}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM'hj$ubah}(h]h ]h"]h$]h&]uh1jphj!ubjq)}(hhh]h)}(h yes (both)h]h yes (both)}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM'hj;ubah}(h]h ]h"]h$]h&]uh1jphj!ubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphj!ubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphj!ubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(hlaunder_folio:h]hlaunder_folio:}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM(hjmubah}(h]h ]h"]h$]h&]uh1jphjjubjq)}(hhh]h)}(hyesh]hyes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM(hjubah}(h]h ]h"]h$]h&]uh1jphjjubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphjjubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphjjubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(his_partially_uptodate:h]his_partially_uptodate:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM)hjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(hyesh]hyes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM)hjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphjubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(herror_remove_folio:h]herror_remove_folio:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM*hjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(hyesh]hyes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM*hjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphjubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(hswap_activate:h]hswap_activate:}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM+hjHubah}(h]h ]h"]h$]h&]uh1jphjEubjq)}(hhh]h)}(hnoh]hno}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM+hj_ubah}(h]h ]h"]h$]h&]uh1jphjEubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphjEubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphjEubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(hswap_deactivate:h]hswap_deactivate:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM,hjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(hnoh]hno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM,hjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphjubeh}(h]h ]h"]h$]h&]uh1jkhjubjl)}(hhh](jq)}(hhh]h)}(hswap_rw:h]hswap_rw:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM-hjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h)}(h yes, unlocksh]h yes, unlocks}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM-hjubah}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphjubjq)}(hhh]h}(h]h ]h"]h$]h&]uh1jphjubeh}(h]h ]h"]h$]h&]uh1jkhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1j-hjubah}(h]h ]h"]h$]h&]uh1j(hjhhhhhNubh)}(he->write_begin(), ->write_end() and ->read_folio() may be called from the request handler (/dev/loop).h]he->write_begin(), ->write_end() and ->read_folio() may be called from the request handler (/dev/loop).}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM0hjhhubh)}(hM->read_folio() unlocks the folio, either synchronously or via I/O completion.h]hM->read_folio() unlocks the folio, either synchronously or via I/O completion.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM3hjhhubh)}(hN->readahead() unlocks the folios that I/O is attempted on like ->read_folio().h]hN->readahead() unlocks the folios that I/O is attempted on like ->read_folio().}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6hjhhubh)}(h->writepage() is used for two purposes: for "memory cleansing" and for "sync". These are quite different operations and the behaviour may differ depending upon the mode.h]h->writepage() is used for two purposes: for “memory cleansing” and for “sync”. These are quite different operations and the behaviour may differ depending upon the mode.}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM8hjhhubh)}(hIf writepage is called for sync (wbc->sync_mode != WBC_SYNC_NONE) then it *must* start I/O against the page, even if that would involve blocking on in-progress I/O.h](hJIf writepage is called for sync (wbc->sync_mode != WBC_SYNC_NONE) then it }(hjkhhhNhNubh)}(h*must*h]hmust}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhjkubhT start I/O against the page, even if that would involve blocking on in-progress I/O.}(hjkhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM<hjhhubh)}(hIf writepage is called for memory cleansing (sync_mode == WBC_SYNC_NONE) then its role is to get as much writeout underway as possible. So writepage should try to avoid blocking against currently-in-progress I/O.h]hIf writepage is called for memory cleansing (sync_mode == WBC_SYNC_NONE) then its role is to get as much writeout underway as possible. So writepage should try to avoid blocking against currently-in-progress I/O.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM@hjhhubh)}(hXLIf the filesystem is not called for "sync" and it determines that it would need to block against in-progress I/O to be able to start new I/O against the page the filesystem should redirty the page with redirty_page_for_writepage(), then unlock the page and return zero. This may also be done to avoid internal deadlocks, but rarely.h]hXPIf the filesystem is not called for “sync” and it determines that it would need to block against in-progress I/O to be able to start new I/O against the page the filesystem should redirty the page with redirty_page_for_writepage(), then unlock the page and return zero. This may also be done to avoid internal deadlocks, but rarely.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMEhjhhubh)}(heIf the filesystem is called for sync then it must wait on any in-progress I/O and then start new I/O.h]heIf the filesystem is called for sync then it must wait on any in-progress I/O and then start new I/O.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMKhjhhubh)}(hXoThe filesystem should unlock the page synchronously, before returning to the caller, unless ->writepage() returns special WRITEPAGE_ACTIVATE value. WRITEPAGE_ACTIVATE means that page cannot really be written out currently, and VM should stop calling ->writepage() on this page for some time. VM does this by moving page to the head of the active list, hence the name.h]hXoThe filesystem should unlock the page synchronously, before returning to the caller, unless ->writepage() returns special WRITEPAGE_ACTIVATE value. WRITEPAGE_ACTIVATE means that page cannot really be written out currently, and VM should stop calling ->writepage() on this page for some time. VM does this by moving page to the head of the active list, hence the name.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMNhjhhubh)}(hXUnless the filesystem is going to redirty_page_for_writepage(), unlock the page and return zero, writepage *must* run set_page_writeback() against the page, followed by unlocking it. Once set_page_writeback() has been run against the page, write I/O can be submitted and the write I/O completion handler must run end_page_writeback() once the I/O is complete. If no I/O is submitted, the filesystem must run end_page_writeback() against the page before returning from writepage.h](hkUnless the filesystem is going to redirty_page_for_writepage(), unlock the page and return zero, writepage }(hjhhhNhNubh)}(h*must*h]hmust}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhXo run set_page_writeback() against the page, followed by unlocking it. Once set_page_writeback() has been run against the page, write I/O can be submitted and the write I/O completion handler must run end_page_writeback() once the I/O is complete. If no I/O is submitted, the filesystem must run end_page_writeback() against the page before returning from writepage.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMUhjhhubh)}(hXThat is: after 2.5.12, pages which are under writeout are *not* locked. Note, if the filesystem needs the page to be locked during writeout, that is ok, too, the page is allowed to be unlocked at any point in time between the calls to set_page_writeback() and end_page_writeback().h](h:That is: after 2.5.12, pages which are under writeout are }(hjhhhNhNubh)}(h*not*h]hnot}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh locked. Note, if the filesystem needs the page to be locked during writeout, that is ok, too, the page is allowed to be unlocked at any point in time between the calls to set_page_writeback() and end_page_writeback().}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM]hjhhubh)}(hXNote, failure to run either redirty_page_for_writepage() or the combination of set_page_writeback()/end_page_writeback() on a page submitted to writepage will leave the page itself marked clean but it will be tagged as dirty in the radix tree. This incoherency can lead to all sorts of hard-to-debug problems in the filesystem like having dirty inodes at umount and losing written data.h]hXNote, failure to run either redirty_page_for_writepage() or the combination of set_page_writeback()/end_page_writeback() on a page submitted to writepage will leave the page itself marked clean but it will be tagged as dirty in the radix tree. This incoherency can lead to all sorts of hard-to-debug problems in the filesystem like having dirty inodes at umount and losing written data.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMbhjhhubh)}(hX->writepages() is used for periodic writeback and for syscall-initiated sync operations. The address_space should start I/O against at least ``*nr_to_write`` pages. ``*nr_to_write`` must be decremented for each page which is written. The address_space implementation may write more (or less) pages than ``*nr_to_write`` asks for, but it should try to be reasonably close. If nr_to_write is NULL, all dirty pages must be written.h](h->writepages() is used for periodic writeback and for syscall-initiated sync operations. The address_space should start I/O against at least }(hjhhhNhNubhliteral)}(h``*nr_to_write``h]h *nr_to_write}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh pages. }(hjhhhNhNubj)}(h``*nr_to_write``h]h *nr_to_write}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh{ must be decremented for each page which is written. The address_space implementation may write more (or less) pages than }(hjhhhNhNubj)}(h``*nr_to_write``h]h *nr_to_write}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhm asks for, but it should try to be reasonably close. If nr_to_write is NULL, all dirty pages must be written.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhhjhhubh)}(hLwritepages should _only_ write pages which are present on mapping->io_pages.h]hLwritepages should _only_ write pages which are present on mapping->io_pages.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMohjhhubh)}(hX!->dirty_folio() is called from various places in the kernel when the target folio is marked as needing writeback. The folio cannot be truncated because either the caller holds the folio lock, or the caller has found the folio while holding the page table lock which will block truncation.h]hX!->dirty_folio() is called from various places in the kernel when the target folio is marked as needing writeback. The folio cannot be truncated because either the caller holds the folio lock, or the caller has found the folio while holding the page table lock which will block truncation.}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMrhjhhubh)}(h->bmap() is currently used by legacy ioctl() (FIBMAP) provided by some filesystems and by the swapper. The latter will eventually go away. Please, keep it that way and don't breed new callers.h]h->bmap() is currently used by legacy ioctl() (FIBMAP) provided by some filesystems and by the swapper. The latter will eventually go away. Please, keep it that way and don’t breed new callers.}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMxhjhhubh)}(hX->invalidate_folio() is called when the filesystem must attempt to drop some or all of the buffers from the page when it is being truncated. It returns zero on success. The filesystem must exclusively acquire invalidate_lock before invalidating page cache in truncate / hole punch path (and thus calling into ->invalidate_folio) to block races between page cache invalidation and page cache filling functions (fault, read, ...).h]hX->invalidate_folio() is called when the filesystem must attempt to drop some or all of the buffers from the page when it is being truncated. It returns zero on success. The filesystem must exclusively acquire invalidate_lock before invalidating page cache in truncate / hole punch path (and thus calling into ->invalidate_folio) to block races between page cache invalidation and page cache filling functions (fault, read, ...).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM|hjhhubh)}(hX->release_folio() is called when the MM wants to make a change to the folio that would invalidate the filesystem's private data. For example, it may be about to be removed from the address_space or split. The folio is locked and not under writeback. It may be dirty. The gfp parameter is not usually used for allocation, but rather to indicate what the filesystem may do to attempt to free the private data. The filesystem may return false to indicate that the folio's private data cannot be freed. If it returns true, it should have already removed the private data from the folio. If a filesystem does not provide a ->release_folio method, the pagecache will assume that private data is buffer_heads and call try_to_free_buffers().h]hX->release_folio() is called when the MM wants to make a change to the folio that would invalidate the filesystem’s private data. For example, it may be about to be removed from the address_space or split. The folio is locked and not under writeback. It may be dirty. The gfp parameter is not usually used for allocation, but rather to indicate what the filesystem may do to attempt to free the private data. The filesystem may return false to indicate that the folio’s private data cannot be freed. If it returns true, it should have already removed the private data from the folio. If a filesystem does not provide a ->release_folio method, the pagecache will assume that private data is buffer_heads and call try_to_free_buffers().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hS->free_folio() is called when the kernel has dropped the folio from the page cache.h]hS->free_folio() is called when the kernel has dropped the folio from the page cache.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hX3->launder_folio() may be called prior to releasing a folio if it is still found to be dirty. It returns zero if the folio was successfully cleaned, or an error value if not. Note that in order to prevent the folio getting mapped back in and redirtied, it needs to be kept locked across the entire operation.h]hX3->launder_folio() may be called prior to releasing a folio if it is still found to be dirty. It returns zero if the folio was successfully cleaned, or an error value if not. Note that in order to prevent the folio getting mapped back in and redirtied, it needs to be kept locked across the entire operation.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hX->swap_activate() will be 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 ->swap_rw(), it should set SWP_FS_OPS, otherwise IO will be submitted directly to the block device ``sis->bdev``.h](hX->swap_activate() will be 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 ->swap_rw(), it should set SWP_FS_OPS, otherwise IO will be submitted directly to the block device }(hjhhhNhNubj)}(h ``sis->bdev``h]h sis->bdev}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hf->swap_deactivate() will be called in the sys_swapoff() path after ->swap_activate() returned success.h]hf->swap_deactivate() will be called in the sys_swapoff() path after ->swap_activate() returned success.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hP->swap_rw will be called for swap IO if SWP_FS_OPS was set by ->swap_activate().h]hP->swap_rw will be called for swap IO if SWP_FS_OPS was set by ->swap_activate().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubeh}(h]address-space-operationsah ]h"]address_space_operationsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hfile_lock_operationsh]hfile_lock_operations}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(h prototypes::h]h prototypes:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj )}(hmvoid (*fl_copy_lock)(struct file_lock *, struct file_lock *); void (*fl_release_private)(struct file_lock *);h]hmvoid (*fl_copy_lock)(struct file_lock *, struct file_lock *); void (*fl_release_private)(struct file_lock *);}hj sbah}(h]h ]h"]h$]h&]jjuh1jhhhMhjhhubh)}(hlocking rules:h]hlocking rules:}(hj* hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj))}(hhh]j.)}(hhh](j3)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j2hj; ubj3)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1j2hj; ubj3)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1j2hj; ubjg)}(hhh]jl)}(hhh](jq)}(hhh]h)}(hopsh]hops}(hje hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjb ubah}(h]h ]h"]h$]h&]uh1jphj_ ubjq)}(hhh]h)}(h inode->i_lockh]h inode->i_lock}(hj| hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjy ubah}(h]h ]h"]h$]h&]uh1jphj_ ubjq)}(hhh]h)}(h may blockh]h may block}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jphj_ ubeh}(h]h ]h"]h$]h&]uh1jkhj\ ubah}(h]h ]h"]h$]h&]uh1jfhj; ubj)}(hhh](jl)}(hhh](jq)}(hhh]h)}(h fl_copy_lock:h]h fl_copy_lock:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jphj ubjq)}(hhh]h)}(hyesh]hyes}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jphj ubjq)}(hhh]h)}(hnoh]hno}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jphj ubeh}(h]h ]h"]h$]h&]uh1jkhj ubjl)}(hhh](jq)}(hhh]h)}(hfl_release_private:h]hfl_release_private:}(hj !hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!ubah}(h]h ]h"]h$]h&]uh1jphj!ubjq)}(hhh]h)}(hmaybeh]hmaybe}(hj!!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!ubah}(h]h ]h"]h$]h&]uh1jphj!ubjq)}(hhh]h)}(h maybe[1]_h]h maybe[1]_}(hj8!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj5!ubah}(h]h ]h"]h$]h&]uh1jphj!ubeh}(h]h ]h"]h$]h&]uh1jkhj ubeh}(h]h ]h"]h$]h&]uh1jhj; ubeh}(h]h ]h"]h$]h&]colsKuh1j-hj8 ubah}(h]h ]h"]h$]h&]uh1j(hjhhhhhNubhcomment)}(h[1]: ->fl_release_private for flock or POSIX locks is currently allowed to block. Leases however can still be freed while the i_lock is held and so fl_release_private called on a lease should not block.h]h[1]: ->fl_release_private for flock or POSIX locks is currently allowed to block. Leases however can still be freed while the i_lock is held and so fl_release_private called on a lease should not block.}hjg!sbah}(h]h ]h"]h$]h&]jjuh1je!hjhhhhhMubeh}(h]file-lock-operationsah ]h"]file_lock_operationsah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(hlock_manager_operationsh]hlock_manager_operations}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj}!hhhhhMubh)}(h prototypes::h]h prototypes:}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj}!hhubj )}(hXivoid (*lm_notify)(struct file_lock *); /* unblock callback */ int (*lm_grant)(struct file_lock *, struct file_lock *, int); void (*lm_break)(struct file_lock *); /* break_lease callback */ int (*lm_change)(struct file_lock **, int); bool (*lm_breaker_owns_lease)(struct file_lock *); bool (*lm_lock_expirable)(struct file_lock *); void (*lm_expire_lock)(void);h]hXivoid (*lm_notify)(struct file_lock *); /* unblock callback */ int (*lm_grant)(struct file_lock *, struct file_lock *, int); void (*lm_break)(struct file_lock *); /* break_lease callback */ int (*lm_change)(struct file_lock **, int); bool (*lm_breaker_owns_lease)(struct file_lock *); bool (*lm_lock_expirable)(struct file_lock *); void (*lm_expire_lock)(void);}hj!sbah}(h]h ]h"]h$]h&]jjuh1jhhhMhj}!hhubh)}(hlocking rules:h]hlocking rules:}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj}!hhubj))}(hhh]j.)}(hhh](j3)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j2hj!ubj3)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1j2hj!ubj3)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j2hj!ubj3)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1j2hj!ubjg)}(hhh]jl)}(hhh](jq)}(hhh]h)}(hopsh]hops}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!ubah}(h]h ]h"]h$]h&]uh1jphj!ubjq)}(hhh]h)}(hflc_lockh]hflc_lock}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj"ubah}(h]h ]h"]h$]h&]uh1jphj!ubjq)}(hhh]h)}(hblocked_lock_lockh]hblocked_lock_lock}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj"ubah}(h]h ]h"]h$]h&]uh1jphj!ubjq)}(hhh]h)}(h may blockh]h may block}(hj4"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1"ubah}(h]h ]h"]h$]h&]uh1jphj!ubeh}(h]h ]h"]h$]h&]uh1jkhj!ubah}(h]h ]h"]h$]h&]uh1jfhj!ubj)}(hhh](jl)}(hhh](jq)}(hhh]h)}(h lm_notify:h]h lm_notify:}(hj]"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjZ"ubah}(h]h ]h"]h$]h&]uh1jphjW"ubjq)}(hhh]h)}(hnoh]hno}(hjt"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjq"ubah}(h]h ]h"]h$]h&]uh1jphjW"ubjq)}(hhh]h)}(hyesh]hyes}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj"ubah}(h]h ]h"]h$]h&]uh1jphjW"ubjq)}(hhh]h)}(hnoh]hno}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj"ubah}(h]h ]h"]h$]h&]uh1jphjW"ubeh}(h]h ]h"]h$]h&]uh1jkhjT"ubjl)}(hhh](jq)}(hhh]h)}(h lm_grant:h]h lm_grant:}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj"ubah}(h]h ]h"]h$]h&]uh1jphj"ubjq)}(hhh]h)}(hnoh]hno}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj"ubah}(h]h ]h"]h$]h&]uh1jphj"ubjq)}(hhh]h)}(hnoh]hno}(hj"hhhNhNubah}(h]h ]h"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1hhhhMhj$ubah}(h]h ]h"]h$]h&]uh1jphj$ubjq)}(hhh]h)}(hyesh]hyes}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$ubah}(h]h ]h"]h$]h&]uh1jphj$ubeh}(h]h ]h"]h$]h&]uh1jkhjT"ubeh}(h]h ]h"]h$]h&]uh1jhj!ubeh}(h]h ]h"]h$]h&]colsKuh1j-hj!ubah}(h]h ]h"]h$]h&]uh1j(hj}!hhhhhNubeh}(h]lock-manager-operationsah ]h"]lock_manager_operationsah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(h buffer_headh]h buffer_head}(hj8%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5%hhhhhMubh)}(h prototypes::h]h prototypes:}(hjF%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj5%hhubj )}(h7void (*b_end_io)(struct buffer_head *bh, int uptodate);h]h7void (*b_end_io)(struct buffer_head *bh, int uptodate);}hjT%sbah}(h]h ]h"]h$]h&]jjuh1jhhhMhj5%hhubh)}(hlocking rules:h]hlocking rules:}(hjb%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj5%hhubh)}(hXcalled from interrupts. In other words, extreme care is needed here. bh is locked, but that's all warranties we have here. Currently only RAID1, highmem, fs/buffer.c, and fs/ntfs/aops.c are providing these. Block devices call this method upon the IO completion.h]hXcalled from interrupts. In other words, extreme care is needed here. bh is locked, but that’s all warranties we have here. Currently only RAID1, highmem, fs/buffer.c, and fs/ntfs/aops.c are providing these. Block devices call this method upon the IO completion.}(hjp%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj5%hhubeh}(h] buffer-headah ]h"] buffer_headah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(hblock_device_operationsh]hblock_device_operations}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj%hhhhhMubh)}(h prototypes::h]h prototypes:}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj%hhubj )}(hXint (*open) (struct block_device *, fmode_t); int (*release) (struct gendisk *, fmode_t); int (*ioctl) (struct block_device *, fmode_t, unsigned, unsigned long); int (*compat_ioctl) (struct block_device *, fmode_t, unsigned, unsigned long); int (*direct_access) (struct block_device *, sector_t, void **, unsigned long *); void (*unlock_native_capacity) (struct gendisk *); int (*getgeo)(struct block_device *, struct hd_geometry *); void (*swap_slot_free_notify) (struct block_device *, unsigned long);h]hXint (*open) (struct block_device *, fmode_t); int (*release) (struct gendisk *, fmode_t); int (*ioctl) (struct block_device *, fmode_t, unsigned, unsigned long); int (*compat_ioctl) (struct block_device *, fmode_t, unsigned, unsigned long); int (*direct_access) (struct block_device *, sector_t, void **, unsigned long *); void (*unlock_native_capacity) (struct gendisk *); int (*getgeo)(struct block_device *, struct hd_geometry *); void (*swap_slot_free_notify) (struct block_device *, unsigned long);}hj%sbah}(h]h ]h"]h$]h&]jjuh1jhhhMhj%hhubh)}(hlocking rules:h]hlocking rules:}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj%hhubj))}(hhh]j.)}(hhh](j3)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j2hj%ubj3)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j2hj%ubjg)}(hhh]jl)}(hhh](jq)}(hhh]h)}(hopsh]hops}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj%ubah}(h]h ]h"]h$]h&]uh1jphj%ubjq)}(hhh]h)}(h open_mutexh]h open_mutex}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj%ubah}(h]h ]h"]h$]h&]uh1jphj%ubeh}(h]h ]h"]h$]h&]uh1jkhj%ubah}(h]h ]h"]h$]h&]uh1jfhj%ubj)}(hhh](jl)}(hhh](jq)}(hhh]h)}(hopen:h]hopen:}(hj$&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!&ubah}(h]h ]h"]h$]h&]uh1jphj&ubjq)}(hhh]h)}(hyesh]hyes}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unlock_native_capacity:}(hj7'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj4'ubah}(h]h ]h"]h$]h&]uh1jphj1'ubjq)}(hhh]h)}(hnoh]hno}(hjN'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjK'ubah}(h]h ]h"]h$]h&]uh1jphj1'ubeh}(h]h ]h"]h$]h&]uh1jkhj&ubjl)}(hhh](jq)}(hhh]h)}(hgetgeo:h]hgetgeo:}(hjn'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjk'ubah}(h]h ]h"]h$]h&]uh1jphjh'ubjq)}(hhh]h)}(hnoh]hno}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj'ubah}(h]h ]h"]h$]h&]uh1jphjh'ubeh}(h]h ]h"]h$]h&]uh1jkhj&ubjl)}(hhh](jq)}(hhh]h)}(hswap_slot_free_notify:h]hswap_slot_free_notify:}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj'ubah}(h]h ]h"]h$]h&]uh1jphj'ubjq)}(hhh]h)}(hno (see below)h]hno (see below)}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj'ubah}(h]h ]h"]h$]h&]uh1jphj'ubeh}(h]h ]h"]h$]h&]uh1jkhj&ubeh}(h]h ]h"]h$]h&]uh1jhj%ubeh}(h]h ]h"]h$]h&]colsKuh1j-hj%ubah}(h]h ]h"]h$]h&]uh1j(hj%hhhhhNubh)}(hPswap_slot_free_notify is called with swap_lock and sometimes the page lock held.h]hPswap_slot_free_notify is called with swap_lock and sometimes the page lock held.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj%hhubeh}(h]block-device-operationsah ]h"]block_device_operationsah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(hfile_operationsh]hfile_operations}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'hhhhhMubh)}(h prototypes::h]h prototypes:}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj'hhubj )}(hXloff_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, bool spin); 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 *); int (*release) (struct inode *, struct file *); int (*fsync) (struct file *, loff_t start, loff_t end, 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); int (*setlease)(struct file *, long, struct file_lock **, void **); long (*fallocate)(struct file *, int, loff_t, loff_t); void (*show_fdinfo)(struct seq_file *m, struct file *f); unsigned (*mmap_capabilities)(struct file *); 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);h]hXloff_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, bool spin); 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 *); int (*release) (struct inode *, struct file *); int (*fsync) (struct file *, loff_t start, loff_t end, 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); int (*setlease)(struct file *, long, struct file_lock **, void **); long (*fallocate)(struct file *, int, loff_t, loff_t); void (*show_fdinfo)(struct seq_file *m, struct file *f); unsigned (*mmap_capabilities)(struct file *); 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);}hj(sbah}(h]h ]h"]h$]h&]jjuh1jhhhM hj'hhubj )}(hhh]j )}(hlocking rules: All may block. h](j )}(hlocking rules:h]hlocking rules:}(hj3(hhhNhNubah}(h]h ]h"]h$]h&]uh1j hhhM0hj/(ubj )}(hhh]h)}(hAll may block.h]hAll may block.}(hjD(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM0hjA(ubah}(h]h ]h"]h$]h&]uh1j hj/(ubeh}(h]h ]h"]h$]h&]uh1j hhhM0hj,(ubah}(h]h ]h"]h$]h&]uh1j hj'hhhhhNubh)}(hX->llseek() locking has moved from llseek to the individual llseek implementations. If your fs is not using generic_file_llseek, you need to acquire and release the appropriate locks in your ->llseek(). For many filesystems, it is probably safe to acquire the inode mutex or just to use i_size_read() instead. Note: this does not protect the file->f_pos against concurrent modifications since this is something the userspace has to take care about.h]hX->llseek() locking has moved from llseek to the individual llseek implementations. If your fs is not using generic_file_llseek, you need to acquire and release the appropriate locks in your ->llseek(). For many filesystems, it is probably safe to acquire the inode mutex or just to use i_size_read() instead. Note: this does not protect the file->f_pos against concurrent modifications since this is something the userspace has to take care about.}(hjd(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM2hj'hhubh)}(hi->iterate_shared() is called with i_rwsem held for reading, and with the file f_pos_lock held exclusivelyh]hi->iterate_shared() is called with i_rwsem held for reading, and with the file f_pos_lock held exclusively}(hjr(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM:hj'hhubh)}(hX->fasync() is responsible for maintaining the FASYNC bit in filp->f_flags. Most instances call fasync_helper(), which does that maintenance, so it's not normally something one needs to worry about. Return values > 0 will be mapped to zero in the VFS layer.h]hX->fasync() is responsible for maintaining the FASYNC bit in filp->f_flags. Most instances call fasync_helper(), which does that maintenance, so it’s not normally something one needs to worry about. Return values > 0 will be mapped to zero in the VFS layer.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM=hj'hhubh)}(hXw->readdir() and ->ioctl() on directories must be changed. Ideally we would move ->readdir() to inode_operations and use a separate method for directory ->ioctl() or kill the latter completely. One of the problems is that for anything that resembles union-mount we won't have a struct file for all components. And there are other reasons why the current interface is a mess...h]hXy->readdir() and ->ioctl() on directories must be changed. Ideally we would move ->readdir() to inode_operations and use a separate method for directory ->ioctl() or kill the latter completely. One of the problems is that for anything that resembles union-mount we won’t have a struct file for all components. And there are other reasons why the current interface is a mess...}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMBhj'hhubh)}(hg->read on directories probably must go away - we should just enforce -EISDIR in sys_read() and friends.h]hg->read on directories probably must go away - we should just enforce -EISDIR in sys_read() and friends.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMHhj'hhubh)}(h->setlease operations should call generic_setlease() before or after setting the lease within the individual filesystem to record the result of the operationh]h->setlease operations should call generic_setlease() before or after setting the lease within the individual filesystem to record the result of the operation}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMKhj'hhubh)}(hX->fallocate implementation must be really careful to maintain page cache consistency when punching holes or performing other operations that invalidate page cache contents. Usually the filesystem needs to call truncate_inode_pages_range() to invalidate relevant range of the page cache. However the filesystem usually also needs to update its internal (and on disk) view of file offset -> disk block mapping. Until this update is finished, the filesystem needs to block page faults and reads from reloading now-stale page cache contents from the disk. Since VFS acquires mapping->invalidate_lock in shared mode when loading pages from disk (filemap_fault(), filemap_read(), readahead paths), the fallocate implementation must take the invalidate_lock to prevent reloading.h]hX->fallocate implementation must be really careful to maintain page cache consistency when punching holes or performing other operations that invalidate page cache contents. Usually the filesystem needs to call truncate_inode_pages_range() to invalidate relevant range of the page cache. However the filesystem usually also needs to update its internal (and on disk) view of file offset -> disk block mapping. Until this update is finished, the filesystem needs to block page faults and reads from reloading now-stale page cache contents from the disk. Since VFS acquires mapping->invalidate_lock in shared mode when loading pages from disk (filemap_fault(), filemap_read(), readahead paths), the fallocate implementation must take the invalidate_lock to prevent reloading.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMOhj'hhubh)}(hX->copy_file_range and ->remap_file_range implementations need to serialize against modifications of file data while the operation is running. For blocking changes through write(2) and similar operations inode->i_rwsem can be used. To block changes to file contents via a memory mapping during the operation, the filesystem must take mapping->invalidate_lock to coordinate with ->page_mkwrite.h]hX->copy_file_range and ->remap_file_range implementations need to serialize against modifications of file data while the operation is running. For blocking changes through write(2) and similar operations inode->i_rwsem can be used. To block changes to file contents via a memory mapping during the operation, the filesystem must take mapping->invalidate_lock to coordinate with ->page_mkwrite.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM[hj'hhubeh}(h]file-operationsah ]h"]file_operationsah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(hdquot_operationsh]hdquot_operations}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(hhhhhMcubh)}(h prototypes::h]h prototypes:}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMehj(hhubj )}(hint (*write_dquot) (struct dquot *); int (*acquire_dquot) (struct dquot *); int (*release_dquot) (struct dquot *); int (*mark_dirty) (struct dquot *); int (*write_info) (struct super_block *, int);h]hint (*write_dquot) (struct dquot *); int (*acquire_dquot) (struct dquot *); int (*release_dquot) (struct dquot *); int (*mark_dirty) (struct dquot *); int (*write_info) (struct super_block *, int);}hj(sbah}(h]h ]h"]h$]h&]jjuh1jhhhMghj(hhubh)}(hThese operations are intended to be more or less wrapping functions that ensure a proper locking wrt the filesystem and call the generic quota operations.h]hThese operations are intended to be more or less wrapping functions that ensure a proper locking wrt the filesystem and call the generic quota operations.}(hj )hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMmhj(hhubh)}(h?What filesystem should expect from the generic quota functions:h]h?What filesystem should expect from the generic quota functions:}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMphj(hhubj))}(hhh]j.)}(hhh](j3)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j2hj()ubj3)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1j2hj()ubj3)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j2hj()ubjg)}(hhh]jl)}(hhh](jq)}(hhh]h)}(hopsh]hops}(hjR)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMshjO)ubah}(h]h ]h"]h$]h&]uh1jphjL)ubjq)}(hhh]h)}(h FS recursionh]h FS recursion}(hji)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMshjf)ubah}(h]h ]h"]h$]h&]uh1jphjL)ubjq)}(hhh]h)}(hHeld locks when calledh]hHeld locks when called}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMshj})ubah}(h]h ]h"]h$]h&]uh1jphjL)ubeh}(h]h ]h"]h$]h&]uh1jkhjI)ubah}(h]h ]h"]h$]h&]uh1jfhj()ubj)}(hhh](jl)}(hhh](jq)}(hhh]h)}(h write_dquot:h]h write_dquot:}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMuhj)ubah}(h]h ]h"]h$]h&]uh1jphj)ubjq)}(hhh]h)}(hyesh]hyes}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMuhj)ubah}(h]h ]h"]h$]h&]uh1jphj)ubjq)}(hhh]h)}(hdqonoff_sem or dqptr_semh]hdqonoff_sem or dqptr_sem}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMuhj)ubah}(h]h ]h"]h$]h&]uh1jphj)ubeh}(h]h ]h"]h$]h&]uh1jkhj)ubjl)}(hhh](jq)}(hhh]h)}(hacquire_dquot:h]hacquire_dquot:}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMvhj)ubah}(h]h ]h"]h$]h&]uh1jphj)ubjq)}(hhh]h)}(hyesh]hyes}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMvhj *ubah}(h]h ]h"]h$]h&]uh1jphj)ubjq)}(hhh]h)}(hdqonoff_sem or dqptr_semh]hdqonoff_sem or dqptr_sem}(hj%*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMvhj"*ubah}(h]h ]h"]h$]h&]uh1jphj)ubeh}(h]h ]h"]h$]h&]uh1jkhj)ubjl)}(hhh](jq)}(hhh]h)}(hrelease_dquot:h]hrelease_dquot:}(hjE*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMwhjB*ubah}(h]h ]h"]h$]h&]uh1jphj?*ubjq)}(hhh]h)}(hyesh]hyes}(hj\*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMwhjY*ubah}(h]h ]h"]h$]h&]uh1jphj?*ubjq)}(hhh]h)}(hdqonoff_sem or dqptr_semh]hdqonoff_sem or dqptr_sem}(hjs*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMwhjp*ubah}(h]h ]h"]h$]h&]uh1jphj?*ubeh}(h]h ]h"]h$]h&]uh1jkhj)ubjl)}(hhh](jq)}(hhh]h)}(h mark_dirty:h]h mark_dirty:}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMxhj*ubah}(h]h ]h"]h$]h&]uh1jphj*ubjq)}(hhh]h)}(hnoh]hno}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMxhj*ubah}(h]h ]h"]h$]h&]uh1jphj*ubjq)}(hhh]h bullet_list)}(hhh]h list_item)}(hhh]h}(h]h ]h"]h$]h&]uh1j*hj*ubah}(h]h ]h"]h$]h&]bullet-uh1j*hhhMxhj*ubah}(h]h ]h"]h$]h&]uh1jphj*ubeh}(h]h ]h"]h$]h&]uh1jkhj)ubjl)}(hhh](jq)}(hhh]h)}(h write_info:h]h write_info:}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMyhj*ubah}(h]h ]h"]h$]h&]uh1jphj*ubjq)}(hhh]h)}(hyesh]hyes}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMyhj*ubah}(h]h ]h"]h$]h&]uh1jphj*ubjq)}(hhh]h)}(h dqonoff_semh]h dqonoff_sem}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMyhj+ubah}(h]h ]h"]h$]h&]uh1jphj*ubeh}(h]h ]h"]h$]h&]uh1jkhj)ubeh}(h]h ]h"]h$]h&]uh1jhj()ubeh}(h]h ]h"]h$]h&]colsKuh1j-hj%)ubah}(h]h ]h"]h$]h&]uh1j(hj(hhhhhNubh)}(hYFS recursion means calling ->quota_read() and ->quota_write() from superblock operations.h]hYFS recursion means calling ->quota_read() and ->quota_write() from superblock operations.}(hjF+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM|hj(hhubh)}(hfault() is called when a previously not present pte is about to be faulted in. The filesystem must find and return the page associated with the passed in "pgoff" in the vm_fault structure. If it is possible that the page may be truncated and/or invalidated, then the filesystem must lock invalidate_lock, then ensure the page is not already truncated (invalidate_lock will block subsequent truncate), and then return with VM_FAULT_LOCKED, and the page locked. The VM will unlock the page.h]hX->fault() is called when a previously not present pte is about to be faulted in. The filesystem must find and return the page associated with the passed in “pgoff” in the vm_fault structure. If it is possible that the page may be truncated and/or invalidated, then the filesystem must lock invalidate_lock, then ensure the page is not already truncated (invalidate_lock will block subsequent truncate), and then return with VM_FAULT_LOCKED, and the page locked. The VM will unlock the page.}(hjR.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjj+hhubh)}(hX->huge_fault() is called when there is no PUD or PMD entry present. This gives the filesystem the opportunity to install a PUD or PMD sized page. Filesystems can also use the ->fault method to return a PMD sized page, so implementing this function may not be necessary. In particular, filesystems should not call filemap_fault() from ->huge_fault(). The mmap_lock may not be held when this method is called.h]hX->huge_fault() is called when there is no PUD or PMD entry present. This gives the filesystem the opportunity to install a PUD or PMD sized page. Filesystems can also use the ->fault method to return a PMD sized page, so implementing this function may not be necessary. In particular, filesystems should not call filemap_fault() from ->huge_fault(). The mmap_lock may not be held when this method is called.}(hj`.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjj+hhubh)}(hX#->map_pages() is called when VM asks to map easy accessible pages. Filesystem should find and map pages associated with offsets from "start_pgoff" till "end_pgoff". ->map_pages() is called with the RCU lock held and must not block. If it's not possible to reach a page without blocking, filesystem should skip it. Filesystem should use set_pte_range() to setup page table entry. Pointer to entry associated with the page is passed in "pte" field in vm_fault structure. Pointers to entries for other offsets should be calculated relative to "pte".h]hX5->map_pages() is called when VM asks to map easy accessible pages. Filesystem should find and map pages associated with offsets from “start_pgoff” till “end_pgoff”. ->map_pages() is called with the RCU lock held and must not block. If it’s not possible to reach a page without blocking, filesystem should skip it. Filesystem should use set_pte_range() to setup page table entry. Pointer to entry associated with the page is passed in “pte” field in vm_fault structure. Pointers to entries for other offsets should be calculated relative to “pte”.}(hjn.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjj+hhubh)}(hX->page_mkwrite() is called when a previously read-only pte is about to become writeable. The filesystem again must ensure that there are no truncate/invalidate races or races with operations such as ->remap_file_range or ->copy_file_range, and then return with the page locked. Usually mapping->invalidate_lock is suitable for proper serialization. If the page has been truncated, the filesystem should not look up a new page like the ->fault() handler, but simply return with VM_FAULT_NOPAGE, which will cause the VM to retry the fault.h]hX->page_mkwrite() is called when a previously read-only pte is about to become writeable. The filesystem again must ensure that there are no truncate/invalidate races or races with operations such as ->remap_file_range or ->copy_file_range, and then return with the page locked. Usually mapping->invalidate_lock is suitable for proper serialization. If the page has been truncated, the filesystem should not look up a new page like the ->fault() handler, but simply return with VM_FAULT_NOPAGE, which will cause the VM to retry the fault.}(hj|.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjj+hhubh)}(hX!->pfn_mkwrite() is the same as page_mkwrite but when the pte is VM_PFNMAP or VM_MIXEDMAP with a page-less entry. Expected return is VM_FAULT_NOPAGE. Or one of the VM_FAULT_ERROR types. The default behavior after this call is to make the pte read-write, unless pfn_mkwrite returns an error.h]hX!->pfn_mkwrite() is the same as page_mkwrite but when the pte is VM_PFNMAP or VM_MIXEDMAP with a page-less entry. Expected return is VM_FAULT_NOPAGE. Or one of the VM_FAULT_ERROR types. The default behavior after this call is to make the pte read-write, unless pfn_mkwrite returns an error.}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjj+hhubh)}(h->access() is called when get_user_pages() fails in access_process_vm(), typically used to debug a process through /proc/pid/mem or ptrace. This function is needed only for VM_IO | VM_PFNMAP VMAs.h]h->access() is called when get_user_pages() fails in access_process_vm(), typically used to debug a process through /proc/pid/mem or ptrace. This function is needed only for VM_IO | VM_PFNMAP VMAs.}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjj+hhubh transition)}(hP--------------------------------------------------------------------------------h]h}(h]h ]h"]h$]h&]uh1j.hhhMhjj+hhubj[)}(hDubious stuff h]h)}(h Dubious stuffh]h Dubious stuff}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj.ubah}(h]h ]h"]h$]h&]uh1jZhhhMhjj+hhubh)}(hf(if you break something or notice that it is broken and do not fix it yourself - at least put it here)h]hf(if you break something or notice that it is broken and do not fix it yourself - at least put it here)}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjj+hhubeh}(h]vm-operations-structah ]h"]vm_operations_structah$]h&]uh1hhhhhhhhMubeh}(h]lockingah ]h"]lockingah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjpfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj /error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j.j.jR jO jjj jjUjRjjjjjz!jw!j2%j/%j%j%j'j'j(j(jg+jd+j.j.u nametypes}(j.jR jj jUjjjz!j2%j%j'j(jg+j.uh}(j.hjO hjjU jjjRj jjXjjjw!jj/%j}!j%j5%j'j%j(j'jd+j(j.jj+u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.