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]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/pt_BR/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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(h prototypes::h]h prototypes:}(hjhhhNhNubah}(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 *);}hjsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1jhhhKhhhhubh)}(hlocking rules:h]hlocking rules:}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK%hhhhubhtable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jFhjCubjG)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jFhjCubjG)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jFhjCubjG)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jFhjCubjG)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jFhjCubhthead)}(hhh]hrow)}(hhh](hentry)}(hhh]h)}(hopsh]hops}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK(hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h rename_lockh]h rename_lock}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK(hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h->d_lockh]h->d_lock}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK(hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h may blockh]h may block}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK(hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hrcu-walkh]hrcu-walk}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK(hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj|ubah}(h]h ]h"]h$]h&]uh1jzhjCubhtbody)}(hhh](j)}(hhh](j)}(hhh]h)}(h d_revalidate:h]h d_revalidate:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK*hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hnoh]hno}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK*hj$ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hnoh]hno}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK*hj;ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hyes (ref-walk)h]hyes (ref-walk)}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK*hjRubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hmaybeh]hmaybe}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK*hjiubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hd_weak_revalidate:h]hd_weak_revalidate:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hnoh]hno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hnoh]hno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hyesh]hyes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hnoh]hno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hd_hashh]hd_hash}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK,hjubah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hK7hjYubah}(h]h ]h"]h$]h&]uh1jhjVubj)}(hhh]h)}(hyesh]hyes}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK7hjpubah}(h]h ]h"]h$]h&]uh1jhjVubj)}(hhh]h)}(hnoh]hno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK7hjubah}(h]h ]h"]h$]h&]uh1jhjVubj)}(hhh]h)}(hnoh]hno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK7hjubah}(h]h ]h"]h$]h&]uh1jhjVubj)}(hhh]h)}(hnoh]hno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK7hjubah}(h]h ]h"]h$]h&]uh1jhjVubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hd_unalias_unlockh]hd_unalias_unlock}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK8hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hyesh]hyes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK8hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hnoh]hno}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK8hj ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hnoh]hno}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK8hj ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hnoh]hno}(hj4 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK8hj1 ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjCubeh}(h]h ]h"]h$]h&]colsKuh1jAhj>ubah}(h]h ]h"]h$]h&]uh1j<hhhhhhhNubeh}(h]dentry-operationsah ]h"]dentry_operationsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hinode_operationsh]hinode_operations}(hjl hhhNhNubah}(h]h ]h"]h$]h&]uh1hhji hhhhhKhji 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 *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); 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 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 *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); 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 posix_acl * (*get_acl)(struct mnt_idmap *, struct dentry *, int); struct offset_ctx *(*get_offset_ctx)(struct inode *inode);}hj sbah}(h]h ]h"]h$]h&]j,j-uh1jhhhK@hji 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 hhhKbhj ubh definition)}(hhh]h)}(h all may blockh]h all may block}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKbhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1j hhhKbhj ubah}(h]h ]h"]h$]h&]uh1j hji hhhhhNubj=)}(hhh]jB)}(hhh](jG)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jFhj ubjG)}(hhh]h}(h]h ]h"]h$]h&]colwidthK3uh1jFhj ubj{)}(hhh]j)}(hhh](j)}(hhh]h)}(hopsh]hops}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKehj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hi_rwsem(inode)h]hi_rwsem(inode)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKehj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jzhj ubj)}(hhh](j)}(hhh](j)}(hhh]h)}(hlookup:h]hlookup:}(hj9 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKghj6 ubah}(h]h ]h"]h$]h&]uh1jhj3 ubj)}(hhh]h)}(hsharedh]hshared}(hjP hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKghjM ubah}(h]h ]h"]h$]h&]uh1jhj3 ubeh}(h]h ]h"]h$]h&]uh1jhj0 ubj)}(hhh](j)}(hhh]h)}(hcreate:h]hcreate:}(hjp hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhjm ubah}(h]h ]h"]h$]h&]uh1jhjj ubj)}(hhh]h)}(h exclusiveh]h exclusive}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhj ubah}(h]h ]h"]h$]h&]uh1jhjj ubeh}(h]h ]h"]h$]h&]uh1jhj0 ubj)}(hhh](j)}(hhh]h)}(hlink:h]hlink:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKihj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hexclusive (both)h]hexclusive (both)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKihj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj0 ubj)}(hhh](j)}(hhh]h)}(hmknod:h]hmknod:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKjhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h exclusiveh]h exclusive}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKjhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj0 ubj)}(hhh](j)}(hhh]h)}(hsymlink:h]hsymlink:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKkhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h exclusiveh]h exclusive}(hj, hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKkhj) ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj0 ubj)}(hhh](j)}(hhh]h)}(hmkdir:h]hmkdir:}(hjL hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKlhjI ubah}(h]h ]h"]h$]h&]uh1jhjF ubj)}(hhh]h)}(h exclusiveh]h exclusive}(hjc hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKlhj` ubah}(h]h ]h"]h$]h&]uh1jhjF ubeh}(h]h ]h"]h$]h&]uh1jhj0 ubj)}(hhh](j)}(hhh]h)}(hunlink:h]hunlink:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKmhj ubah}(h]h ]h"]h$]h&]uh1jhj} ubj)}(hhh]h)}(hexclusive (both)h]hexclusive (both)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKmhj ubah}(h]h ]h"]h$]h&]uh1jhj} ubeh}(h]h ]h"]h$]h&]uh1jhj0 ubj)}(hhh](j)}(hhh]h)}(hrmdir:h]hrmdir:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKnhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hexclusive (both)(see below)h]hexclusive (both)(see below)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKnhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj0 ubj)}(hhh](j)}(hhh]h)}(hrename:h]hrename:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKohj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h3exclusive (both parents, some children) (see below)h]h3exclusive (both parents, some children) (see below)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKohj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj0 ubj)}(hhh](j)}(hhh]h)}(h readlink:h]h readlink:}(hj( hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKphj% ubah}(h]h ]h"]h$]h&]uh1jhj" ubj)}(hhh]h)}(hnoh]hno}(hj? hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKphj< ubah}(h]h ]h"]h$]h&]uh1jhj" ubeh}(h]h ]h"]h$]h&]uh1jhj0 ubj)}(hhh](j)}(hhh]h)}(h get_link:h]h get_link:}(hj_ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKqhj\ ubah}(h]h ]h"]h$]h&]uh1jhjY ubj)}(hhh]h)}(hnoh]hno}(hjv hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKqhjs ubah}(h]h ]h"]h$]h&]uh1jhjY ubeh}(h]h ]h"]h$]h&]uh1jhj0 ubj)}(hhh](j)}(hhh]h)}(hsetattr:h]hsetattr:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKrhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h exclusiveh]h exclusive}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKrhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj0 ubj)}(hhh](j)}(hhh]h)}(h permission:h]h permission:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKshj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(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&]uh1hhhhKshj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj0 ubj)}(hhh](j)}(hhh]h)}(hget_inode_acl:h]hget_inode_acl:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKthj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hnoh]hno}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKthj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj0 ubj)}(hhh](j)}(hhh]h)}(hget_acl:h]hget_acl:}(hj; hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKuhj8 ubah}(h]h ]h"]h$]h&]uh1jhj5 ubj)}(hhh]h)}(hnoh]hno}(hjR hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKuhjO ubah}(h]h ]h"]h$]h&]uh1jhj5 ubeh}(h]h ]h"]h$]h&]uh1jhj0 ubj)}(hhh](j)}(hhh]h)}(hgetattr:h]hgetattr:}(hjr hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKvhjo ubah}(h]h ]h"]h$]h&]uh1jhjl ubj)}(hhh]h)}(hnoh]hno}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKvhj ubah}(h]h ]h"]h$]h&]uh1jhjl ubeh}(h]h ]h"]h$]h&]uh1jhj0 ubj)}(hhh](j)}(hhh]h)}(h listxattr:h]h listxattr:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKwhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hnoh]hno}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKwhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj0 ubj)}(hhh](j)}(hhh]h)}(hfiemap:h]hfiemap:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKxhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hnoh]hno}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKxhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj0 ubj)}(hhh](j)}(hhh]h)}(h update_time:h]h update_time:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKyhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hnoh]hno}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKyhj+ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj0 ubj)}(hhh](j)}(hhh]h)}(hsync_lazytime:h]hsync_lazytime:}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKzhjKubah}(h]h ]h"]h$]h&]uh1jhjHubj)}(hhh]h)}(hnoh]hno}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKzhjbubah}(h]h ]h"]h$]h&]uh1jhjHubeh}(h]h ]h"]h$]h&]uh1jhj0 ubj)}(hhh](j)}(hhh]h)}(h atomic_open:h]h atomic_open:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK{hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h2shared (exclusive if O_CREAT is set in open flags)h]h2shared (exclusive if O_CREAT is set in open flags)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK{hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj0 ubj)}(hhh](j)}(hhh]h)}(htmpfile:h]htmpfile:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK|hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hnoh]hno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK|hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj0 ubj)}(hhh](j)}(hhh]h)}(h fileattr_get:h]h fileattr_get:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK}hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hno or exclusiveh]hno or exclusive}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK}hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj0 ubj)}(hhh](j)}(hhh]h)}(h fileattr_set:h]h fileattr_set:}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK~hj'ubah}(h]h ]h"]h$]h&]uh1jhj$ubj)}(hhh]h)}(h exclusiveh]h exclusive}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK~hj>ubah}(h]h ]h"]h$]h&]uh1jhj$ubeh}(h]h ]h"]h$]h&]uh1jhj0 ubj)}(hhh](j)}(hhh]h)}(hget_offset_ctxh]hget_offset_ctx}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj^ubah}(h]h ]h"]h$]h&]uh1jhj[ubj)}(hhh]h)}(hnoh]hno}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjuubah}(h]h ]h"]h$]h&]uh1jhj[ubeh}(h]h ]h"]h$]h&]uh1jhj0 ubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]colsKuh1jAhj ubah}(h]h ]h"]h$]h&]uh1j<hji 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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhhhKhji 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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhji hhubeh}(h]inode-operationsah ]h"]inode_operationsah$]h&]uh1hhhhhhhhKi_lock!!!h]h!!!inode->i_lock!!!}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjeubah}(h]h ]h"]h$]h&]uh1jhjBubeh}(h]h ]h"]h$]h&]uh1jhj7ubj)}(hhh](j)}(hhh]h)}(h evict_inode:h]h evict_inode:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj7ubj)}(hhh](j)}(hhh]h)}(h put_super:h]h put_super:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hwriteh]hwrite}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]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h)}(h (see below)h]h (see below)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj7ubj)}(hhh](j)}(hhh]h)}(h umount_begin:h]h umount_begin:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hnoh]hno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj7ubj)}(hhh](j)}(hhh]h)}(h show_options:h]h show_options:}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjEubah}(h]h ]h"]h$]h&]uh1jhjBubj)}(hhh]h)}(hnoh]hno}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj\ubah}(h]h ]h"]h$]h&]uh1jhjBubj)}(hhh]h)}(h(namespace_sem)h]h(namespace_sem)}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjsubah}(h]h ]h"]h$]h&]uh1jhjBubeh}(h]h ]h"]h$]h&]uh1jhj7ubj)}(hhh](j)}(hhh]h)}(h quota_read:h]h quota_read:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hnoh]hno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h (see below)h]h (see below)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj7ubj)}(hhh](j)}(hhh]h)}(h quota_write:h]h quota_write:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hnoh]hno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h (see below)h]h (see below)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj7ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jAhjubah}(h]h ]h"]h$]h&]uh1j<hjWhhhhhNubh)}(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.}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjWhhubh)}(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.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjWhhubeh}(h]super-operationsah ]h"]super_operationsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hfile_system_typeh]hfile_system_type}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjchhhhhKubh)}(h prototypes::h]h prototypes:}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjchhubj)}(h'void (*kill_sb) (struct super_block *);h]h'void (*kill_sb) (struct super_block *);}hjsbah}(h]h ]h"]h$]h&]j,j-uh1jhhhKhjchhubh)}(hlocking rules:h]hlocking rules:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjchhubj=)}(hhh]jB)}(hhh](jG)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jFhjubjG)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jFhjubj{)}(hhh]j)}(hhh](j)}(hhh]h)}(hopsh]hops}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h may blockh]h may block}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jzhjubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hkill_sbh]hkill_sb}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hyesh]hyes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jAhjubah}(h]h ]h"]h$]h&]uh1j<hjchhhhhNubh)}(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.}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjchhubeh}(h]file-system-typeah ]h"]file_system_typeah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(haddress_space_operationsh]haddress_space_operations}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[hhhhhKubh)}(h prototypes::h]h prototypes:}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj[hhubj)}(hXJint (*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)(const struct kiocb *, struct address_space *mapping, loff_t pos, unsigned len, struct folio **foliop, 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 *); 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]hXJint (*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)(const struct kiocb *, struct address_space *mapping, loff_t pos, unsigned len, struct folio **foliop, 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 *); 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);}hjzsbah}(h]h ]h"]h$]h&]j,j-uh1jhhhKhj[hhubj )}(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 hj[hhhhhNubj=)}(hhh]jB)}(hhh](jG)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jFhjubjG)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jFhjubjG)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jFhjubjG)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jFhjubj{)}(hhh]j)}(hhh](j)}(hhh]h)}(hopsh]hops}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h folio lockedh]h folio locked}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hi_rwsemh]hi_rwsem}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj"ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hinvalidate_lockh]hinvalidate_lock}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj9ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jzhjubj)}(hhh](j)}(hhh](j)}(hhh]h)}(h read_folio:h]h read_folio:}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjbubah}(h]h ]h"]h$]h&]uh1jhj_ubj)}(hhh]h)}(h yes, unlocksh]h yes, unlocks}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjyubah}(h]h ]h"]h$]h&]uh1jhj_ubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj_ubj)}(hhh]h)}(hsharedh]hshared}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhj_ubeh}(h]h ]h"]h$]h&]uh1jhj\ubj)}(hhh](j)}(hhh]h)}(h writepages:h]h writepages:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj\ubj)}(hhh](j)}(hhh]h)}(h dirty_folio:h]h dirty_folio:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hmaybeh]hmaybe}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj\ubj)}(hhh](j)}(hhh]h)}(h readahead:h]h readahead:}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj=ubah}(h]h ]h"]h$]h&]uh1jhj:ubj)}(hhh]h)}(h yes, unlocksh]h yes, unlocks}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjTubah}(h]h ]h"]h$]h&]uh1jhj:ubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj:ubj)}(hhh]h)}(hsharedh]hshared}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjtubah}(h]h ]h"]h$]h&]uh1jhj:ubeh}(h]h ]h"]h$]h&]uh1jhj\ubj)}(hhh](j)}(hhh]h)}(h write_begin:h]h write_begin:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hlocks the folioh]hlocks the folio}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h exclusiveh]h exclusive}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj\ubj)}(hhh](j)}(hhh]h)}(h write_end:h]h write_end:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h yes, unlocksh]h yes, unlocks}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h exclusiveh]h exclusive}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj\ubj)}(hhh](j)}(hhh]h)}(hbmap:h]hbmap:}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjBubah}(h]h ]h"]h$]h&]uh1jhj?ubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj?ubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj?ubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj?ubeh}(h]h ]h"]h$]h&]uh1jhj\ubj)}(hhh](j)}(hhh]h)}(hinvalidate_folio:h]hinvalidate_folio:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj}ubah}(h]h ]h"]h$]h&]uh1jhjzubj)}(hhh]h)}(hyesh]hyes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjzubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjzubj)}(hhh]h)}(h exclusiveh]h exclusive}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjzubeh}(h]h ]h"]h$]h&]uh1jhj\ubj)}(hhh](j)}(hhh]h)}(hrelease_folio:h]hrelease_folio:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hyesh]hyes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj\ubj)}(hhh](j)}(hhh]h)}(h free_folio:h]h free_folio:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hyesh]hyes}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj4ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj\ubj)}(hhh](j)}(hhh]h)}(h direct_IO:h]h direct_IO:}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjfubah}(h]h ]h"]h$]h&]uh1jhjcubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjcubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjcubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjcubeh}(h]h ]h"]h$]h&]uh1jhj\ubj)}(hhh](j)}(hhh]h)}(hmigrate_folio:h]hmigrate_folio:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h yes (both)h]h yes (both)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj\ubj)}(hhh](j)}(hhh]h)}(hlaunder_folio:h]hlaunder_folio:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hyesh]hyes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj\ubj)}(hhh](j)}(hhh]h)}(his_partially_uptodate:h]his_partially_uptodate:}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hj3ubah}(h]h ]h"]h$]h&]uh1jhj0ubj)}(hhh]h)}(hyesh]hyes}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjJubah}(h]h ]h"]h$]h&]uh1jhj0ubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj0ubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj0ubeh}(h]h ]h"]h$]h&]uh1jhj\ubj)}(hhh](j)}(hhh]h)}(herror_remove_folio:h]herror_remove_folio:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hj|ubah}(h]h ]h"]h$]h&]uh1jhjyubj)}(hhh]h)}(hyesh]hyes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjubah}(h]h ]h"]h$]h&]uh1jhjyubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjyubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjyubeh}(h]h ]h"]h$]h&]uh1jhj\ubj)}(hhh](j)}(hhh]h)}(hswap_activate:h]hswap_activate:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM$hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hnoh]hno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM$hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj\ubj)}(hhh](j)}(hhh]h)}(hswap_deactivate:h]hswap_deactivate:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM%hjubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hnoh]hno}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM%hj%ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj\ubj)}(hhh](j)}(hhh]h)}(hswap_rw:h]hswap_rw:}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM&hjWubah}(h]h ]h"]h$]h&]uh1jhjTubj)}(hhh]h)}(h yes, unlocksh]h yes, unlocks}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM&hjnubah}(h]h ]h"]h$]h&]uh1jhjTubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjTubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjTubeh}(h]h ]h"]h$]h&]uh1jhj\ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jAhjubah}(h]h ]h"]h$]h&]uh1j<hj[hhhhhNubh)}(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).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM)hj[hhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM,hj[hhubh)}(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().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM/hj[hhubh)}(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}(hjhhhNhNubah}(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}(hjhhhNhNubah}(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&]uh1hhhhM1hj[hhubh)}(hKwritepages should _only_ write pages which are present in mapping->i_pages.h]hKwritepages should _only_ write pages which are present in mapping->i_pages.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM8hj[hhubh)}(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.}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM;hj[hhubh)}(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.}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMAhj[hhubh)}(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, ...).}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMEhj[hhubh)}(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().}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMLhj[hhubh)}(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.}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMXhj[hhubh)}(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.}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM[hj[hhubh)}(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&]uh1hhhhMahj[hhubh)}(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&]uh1hhhhMihj[hhubh)}(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&]uh1hhhhMlhj[hhubeh}(h]address-space-operationsah ]h"]address_space_operationsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hfile_lock_operationsh]hfile_lock_operations}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMoubh)}(h prototypes::h]h prototypes:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMqhjhhubj)}(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 *);}hjsbah}(h]h ]h"]h$]h&]j,j-uh1jhhhMshjhhubh)}(hlocking rules:h]hlocking rules:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMwhjhhubj=)}(hhh]jB)}(hhh](jG)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jFhjubjG)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jFhjubjG)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jFhjubj{)}(hhh]j)}(hhh](j)}(hhh]h)}(hopsh]hops}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMzhj+ubah}(h]h ]h"]h$]h&]uh1jhj(ubj)}(hhh]h)}(h inode->i_lockh]h inode->i_lock}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMzhjBubah}(h]h ]h"]h$]h&]uh1jhj(ubj)}(hhh]h)}(h may blockh]h may block}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMzhjYubah}(h]h ]h"]h$]h&]uh1jhj(ubeh}(h]h ]h"]h$]h&]uh1jhj%ubah}(h]h ]h"]h$]h&]uh1jzhjubj)}(hhh](j)}(hhh](j)}(hhh]h)}(h fl_copy_lock:h]h fl_copy_lock:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM|hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hyesh]hyes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM|hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hnoh]hno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM|hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj|ubj)}(hhh](j)}(hhh]h)}(hfl_release_private:h]hfl_release_private:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM}hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hmaybeh]hmaybe}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM}hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h maybe[1]_h]h maybe[1]_}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM}hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj|ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jAhjubah}(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.}hj0 sbah}(h]h ]h"]h$]h&]j,j-uh1j. hjhhhhhMubeh}(h]file-lock-operationsah ]h"]file_lock_operationsah$]h&]uh1hhhhhhhhMoubh)}(hhh](h)}(hlock_manager_operationsh]hlock_manager_operations}(hjI hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjF hhhhhMubh)}(h prototypes::h]h prototypes:}(hjW hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjF hhubj)}(hXvoid (*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); bool (*lm_breaker_timedout)(struct file_lease *);h]hXvoid (*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); bool (*lm_breaker_timedout)(struct file_lease *);}hje sbah}(h]h ]h"]h$]h&]j,j-uh1jhhhMhjF hhubh)}(hlocking rules:h]hlocking rules:}(hjs hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjF hhubj=)}(hhh]jB)}(hhh](jG)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jFhj ubjG)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jFhj ubjG)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jFhj ubjG)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jFhj ubj{)}(hhh]j)}(hhh](j)}(hhh]h)}(hopsh]hops}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hflc_lockh]hflc_lock}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hblocked_lock_lockh]hblocked_lock_lock}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h may blockh]h may block}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jzhj ubj)}(hhh](j)}(hhh](j)}(hhh]h)}(h lm_notify:h]h lm_notify:}(hj&!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj#!ubah}(h]h ]h"]h$]h&]uh1jhj !ubj)}(hhh]h)}(hnoh]hno}(hj=!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj:!ubah}(h]h ]h"]h$]h&]uh1jhj !ubj)}(hhh]h)}(hyesh]hyes}(hjT!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjQ!ubah}(h]h ]h"]h$]h&]uh1jhj !ubj)}(hhh]h)}(hnoh]hno}(hjk!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjh!ubah}(h]h ]h"]h$]h&]uh1jhj !ubeh}(h]h ]h"]h$]h&]uh1jhj!ubj)}(hhh](j)}(hhh]h)}(h lm_grant:h]h lm_grant:}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!ubah}(h]h ]h"]h$]h&]uh1jhj!ubj)}(hhh]h)}(hnoh]hno}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!ubah}(h]h ]h"]h$]h&]uh1jhj!ubj)}(hhh]h)}(hnoh]hno}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!ubah}(h]h ]h"]h$]h&]uh1jhj!ubj)}(hhh]h)}(hnoh]hno}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!ubah}(h]h ]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j)}(hhh](j)}(hhh]h)}(hlm_open_conflicth]hlm_open_conflict}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj#ubah}(h]h ]h"]h$]h&]uh1jhj#ubj)}(hhh]h)}(hyesh]hyes}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj#ubah}(h]h ]h"]h$]h&]uh1jhj#ubj)}(hhh]h)}(hnoh]hno}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$ubah}(h]h ]h"]h$]h&]uh1jhj#ubj)}(hhh]h)}(hnoh]hno}(hj.$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj+$ubah}(h]h ]h"]h$]h&]uh1jhj#ubeh}(h]h ]h"]h$]h&]uh1jhj!ubj)}(hhh](j)}(hhh]h)}(hlm_breaker_timedouth]hlm_breaker_timedout}(hjN$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjK$ubah}(h]h ]h"]h$]h&]uh1jhjH$ubj)}(hhh]h)}(hyesh]hyes}(hje$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjb$ubah}(h]h ]h"]h$]h&]uh1jhjH$ubj)}(hhh]h)}(hnoh]hno}(hj|$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjy$ubah}(h]h ]h"]h$]h&]uh1jhjH$ubj)}(hhh]h)}(hnoh]hno}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$ubah}(h]h ]h"]h$]h&]uh1jhjH$ubeh}(h]h ]h"]h$]h&]uh1jhj!ubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]colsKuh1jAhj ubah}(h]h ]h"]h$]h&]uh1j<hjF hhhhhNubeh}(h]lock-manager-operationsah ]h"]lock_manager_operationsah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(h buffer_headh]h buffer_head}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hhhhhMubh)}(h prototypes::h]h prototypes:}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$hhubj)}(h7void (*b_end_io)(struct buffer_head *bh, int uptodate);h]h7void (*b_end_io)(struct buffer_head *bh, int uptodate);}hj$sbah}(h]h ]h"]h$]h&]j,j-uh1jhhhMhj$hhubh)}(hlocking rules:h]hlocking rules:}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$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.}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$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)}(hX int (*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 gendisk *, struct hd_geometry *); void (*swap_slot_free_notify) (struct block_device *, unsigned long);h]hX int (*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 gendisk *, struct hd_geometry *); void (*swap_slot_free_notify) (struct block_device *, unsigned long);}hj8%sbah}(h]h ]h"]h$]h&]j,j-uh1jhhhMhj%hhubh)}(hlocking rules:h]hlocking rules:}(hjF%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj%hhubj=)}(hhh]jB)}(hhh](jG)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jFhjW%ubjG)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jFhjW%ubj{)}(hhh]j)}(hhh](j)}(hhh]h)}(hopsh]hops}(hjw%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjt%ubah}(h]h ]h"]h$]h&]uh1jhjq%ubj)}(hhh]h)}(h open_mutexh]h open_mutex}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj%ubah}(h]h ]h"]h$]h&]uh1jhjq%ubeh}(h]h ]h"]h$]h&]uh1jhjn%ubah}(h]h ]h"]h$]h&]uh1jzhjW%ubj)}(hhh](j)}(hhh](j)}(hhh]h)}(hopen:h]hopen:}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj%ubah}(h]h ]h"]h$]h&]uh1jhj%ubj)}(hhh]h)}(hyesh]hyes}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj%ubah}(h]h ]h"]h$]h&]uh1jhj%ubeh}(h]h ]h"]h$]h&]uh1jhj%ubj)}(hhh](j)}(hhh]h)}(hrelease:h]hrelease:}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj%ubah}(h]h ]h"]h$]h&]uh1jhj%ubj)}(hhh]h)}(hyesh]hyes}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj&ubah}(h]h ]h"]h$]h&]uh1jhj%ubeh}(h]h ]h"]h$]h&]uh1jhj%ubj)}(hhh](j)}(hhh]h)}(hioctl:h]hioctl:}(hj%&hhhNhNubah}(h]h ]h"]h$]h&]uh1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]h"]h$]h&]uh1jhj%ubj)}(hhh](j)}(hhh]h)}(hswap_slot_free_notify:h]hswap_slot_free_notify:}(hj8'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj5'ubah}(h]h ]h"]h$]h&]uh1jhj2'ubj)}(hhh]h)}(hno (see below)h]hno (see below)}(hjO'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjL'ubah}(h]h ]h"]h$]h&]uh1jhj2'ubeh}(h]h ]h"]h$]h&]uh1jhj%ubeh}(h]h ]h"]h$]h&]uh1jhjW%ubeh}(h]h ]h"]h$]h&]colsKuh1jAhjT%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&]uh1hhhhMhj'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&]j,j-uh1jhhhMhj'hhubj )}(hhh]j )}(hlocking rules: All may block. h](j )}(hlocking rules:h]hlocking rules:}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1j hhhMhj'ubj )}(hhh]h)}(hAll may block.h]hAll may block.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj'ubah}(h]h ]h"]h$]h&]uh1j hj'ubeh}(h]h ]h"]h$]h&]uh1j hhhMhj'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.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj'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}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj'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&]uh1hhhhMhj'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&]uh1hhhhMhj'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&]uh1hhhhMhj'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.}(hjK(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj'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.}(hjY(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM'hj'hhubeh}(h]file-operationsah ]h"]file_operationsah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(hdquot_operationsh]hdquot_operations}(hjr(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjo(hhhhhM/ubh)}(h prototypes::h]h prototypes:}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM1hjo(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&]j,j-uh1jhhhM3hjo(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&]uh1hhhhM9hjo(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&]uh1hhhhM<hjo(hhubj=)}(hhh]jB)}(hhh](jG)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jFhj(ubjG)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jFhj(ubjG)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jFhj(ubj{)}(hhh]j)}(hhh](j)}(hhh]h)}(hopsh]hops}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM?hj(ubah}(h]h ]h"]h$]h&]uh1jhj(ubj)}(hhh]h)}(h FS recursionh]h FS recursion}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM?hj(ubah}(h]h ]h"]h$]h&]uh1jhj(ubj)}(hhh]h)}(hHeld locks when calledh]hHeld locks when called}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM?hj)ubah}(h]h ]h"]h$]h&]uh1jhj(ubeh}(h]h ]h"]h$]h&]uh1jhj(ubah}(h]h ]h"]h$]h&]uh1jzhj(ubj)}(hhh](j)}(hhh](j)}(hhh]h)}(h write_dquot:h]h write_dquot:}(hj<)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMAhj9)ubah}(h]h ]h"]h$]h&]uh1jhj6)ubj)}(hhh]h)}(hyesh]hyes}(hjS)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMAhjP)ubah}(h]h ]h"]h$]h&]uh1jhj6)ubj)}(hhh]h)}(hdqonoff_sem or dqptr_semh]hdqonoff_sem or dqptr_sem}(hjj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMAhjg)ubah}(h]h ]h"]h$]h&]uh1jhj6)ubeh}(h]h ]h"]h$]h&]uh1jhj3)ubj)}(hhh](j)}(hhh]h)}(hacquire_dquot:h]hacquire_dquot:}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMBhj)ubah}(h]h ]h"]h$]h&]uh1jhj)ubj)}(hhh]h)}(hyesh]hyes}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMBhj)ubah}(h]h ]h"]h$]h&]uh1jhj)ubj)}(hhh]h)}(hdqonoff_sem or dqptr_semh]hdqonoff_sem or dqptr_sem}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMBhj)ubah}(h]h ]h"]h$]h&]uh1jhj)ubeh}(h]h ]h"]h$]h&]uh1jhj3)ubj)}(hhh](j)}(hhh]h)}(hrelease_dquot:h]hrelease_dquot:}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMChj)ubah}(h]h ]h"]h$]h&]uh1jhj)ubj)}(hhh]h)}(hyesh]hyes}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMChj)ubah}(h]h ]h"]h$]h&]uh1jhj)ubj)}(hhh]h)}(hdqonoff_sem or dqptr_semh]hdqonoff_sem or dqptr_sem}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMChj*ubah}(h]h ]h"]h$]h&]uh1jhj)ubeh}(h]h ]h"]h$]h&]uh1jhj3)ubj)}(hhh](j)}(hhh]h)}(h mark_dirty:h]h mark_dirty:}(hj&*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMDhj#*ubah}(h]h ]h"]h$]h&]uh1jhj *ubj)}(hhh]h)}(hnoh]hno}(hj=*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMDhj:*ubah}(h]h ]h"]h$]h&]uh1jhj *ubj)}(hhh]h bullet_list)}(hhh]h list_item)}(hhh]h}(h]h ]h"]h$]h&]uh1jY*hjV*ubah}(h]h ]h"]h$]h&]bullet-uh1jT*hhhMDhjQ*ubah}(h]h ]h"]h$]h&]uh1jhj *ubeh}(h]h ]h"]h$]h&]uh1jhj3)ubj)}(hhh](j)}(hhh]h)}(h write_info:h]h write_info:}(hj~*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMEhj{*ubah}(h]h ]h"]h$]h&]uh1jhjx*ubj)}(hhh]h)}(hyesh]hyes}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMEhj*ubah}(h]h ]h"]h$]h&]uh1jhjx*ubj)}(hhh]h)}(h dqonoff_semh]h dqonoff_sem}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMEhj*ubah}(h]h ]h"]h$]h&]uh1jhjx*ubeh}(h]h ]h"]h$]h&]uh1jhj3)ubeh}(h]h ]h"]h$]h&]uh1jhj(ubeh}(h]h ]h"]h$]h&]colsKuh1jAhj(ubah}(h]h ]h"]h$]h&]uh1j<hjo(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.}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMHhjo(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.}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMjhj*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&]uh1hhhhMrhj*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”.}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMyhj*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&]uh1hhhhMhj*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&]uh1hhhhMhj*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&]uh1hhhhMhj*hhubh transition)}(hP--------------------------------------------------------------------------------h]h}(h]h ]h"]h$]h&]uh1j9.hhhMhj*hhubj)}(hDubious stuff h]h)}(h Dubious stuffh]h Dubious stuff}(hjI.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjE.ubah}(h]h ]h"]h$]h&]uh1jhhhMhj*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&]uh1hhhhMhj*hhubeh}(h]vm-operations-structah ]h"]vm_operations_structah$]h&]uh1hhhhhhhhMNubeh}(h]lockingah ]h"]lockingah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjfootnote_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}(jx.ju.jf jc jjjTjQj`j]jXjUjjjC j@ j$j$j%j%j'j'jl(ji(j*j*jp.jm.u nametypes}(jx.jf jjTj`jXjjC j$j%j'jl(j*jp.uh}(ju.hjc hjji jQjj]jWjUjcjj[j@ jj$jF j%j$j'j%ji(j'j*jo(jm.j*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.