Lines Matching refs:struct
92 extern int register_filesystem(struct file_system_type *);
93 extern int unregister_filesystem(struct file_system_type *);
95 The passed struct file_system_type describes your filesystem. When a
105 struct file_system_type
113 struct file_system_type {
116 int (*init_fs_context)(struct fs_context *);
117 const struct fs_parameter_spec *parameters;
118 void (*kill_sb) (struct super_block *);
119 struct module *owner;
120 struct file_system_type * next;
121 struct hlist_head fs_supers;
123 struct lock_class_key s_lock_key;
124 struct lock_class_key s_umount_key;
125 struct lock_class_key s_vfs_rename_key;
126 struct lock_class_key s_writers_key[SB_FREEZE_LEVELS];
128 struct lock_class_key i_lock_key;
129 struct lock_class_key i_mutex_key;
130 struct lock_class_key invalidate_lock_key;
131 struct lock_class_key i_mutex_dir_key;
142 Initializes 'struct fs_context' ->ops and ->fs_private fields with
147 'struct fs_parameter_spec'.
174 struct super_operations
182 struct super_operations {
183 struct inode *(*alloc_inode)(struct super_block *sb);
184 void (*destroy_inode)(struct inode *);
185 void (*free_inode)(struct inode *);
187 void (*dirty_inode) (struct inode *, int flags);
188 int (*write_inode) (struct inode *, struct writeback_control *wbc);
189 int (*drop_inode) (struct inode *);
190 void (*evict_inode) (struct inode *);
191 void (*put_super) (struct super_block *);
192 int (*sync_fs)(struct super_block *sb, int wait);
193 int (*freeze_super) (struct super_block *sb,
195 int (*freeze_fs) (struct super_block *);
196 int (*thaw_super) (struct super_block *sb,
198 int (*unfreeze_fs) (struct super_block *);
199 int (*statfs) (struct dentry *, struct kstatfs *);
200 void (*umount_begin) (struct super_block *);
202 int (*show_options)(struct seq_file *, struct dentry *);
203 int (*show_devname)(struct seq_file *, struct dentry *);
204 int (*show_path)(struct seq_file *, struct dentry *);
205 int (*show_stats)(struct seq_file *, struct dentry *);
207 ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t);
208 ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t);
209 struct dquot **(*get_dquots)(struct inode *);
211 long (*nr_cached_objects)(struct super_block *,
212 struct shrink_control *);
213 long (*free_cached_objects)(struct super_block *,
214 struct shrink_control *);
224 struct inode and initialize it. If this function is not
225 defined, a simple 'struct inode' is allocated. Normally
227 contains a 'struct inode' embedded within it.
231 allocated for struct inode. It is only required if
237 in ->destroy_inode to free 'struct inode' memory, then it's
246 and struct inode has times updated since the last ->dirty_inode
317 '(struct mount).mnt_devname' will be used.
334 called by quota to get 'struct dquot' array for a particular inode.
361 field. This is a pointer to a "struct inode_operations" which describes
365 struct xattr_handler
409 struct inode_operations
417 struct inode_operations {
418 int (*create) (struct mnt_idmap *, struct inode *,struct dentry *, umode_t);
419 struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int);
420 int (*link) (struct dentry *,struct inode *,struct dentry *);
421 int (*unlink) (struct inode *,struct dentry *);
422 int (*symlink) (struct mnt_idmap *, struct inode *,struct dentry *,const char *);
423 struct dentry *(*mkdir) (struct mnt_idmap *, struct inode *,struct dentry *,umode_t);
424 int (*rmdir) (struct inode *,struct dentry *);
425 int (*mknod) (struct mnt_idmap *, struct inode *,struct dentry *,umode_t,dev_t);
426 int (*rename) (struct mnt_idmap *, struct inode *, struct dentry *,
427 struct inode *, struct dentry *, unsigned int);
428 int (*readlink) (struct dentry *, char __user *,int);
429 const char *(*get_link) (struct dentry *, struct inode *,
430 struct delayed_call *);
431 int (*permission) (struct mnt_idmap *, struct inode *, int);
432 struct posix_acl * (*get_inode_acl)(struct inode *, int, bool);
433 int (*setattr) (struct mnt_idmap *, struct dentry *, struct iattr *);
434 int (*getattr) (struct mnt_idmap *, const struct path *, struct kstat *, u32, unsigned int);
435 ssize_t (*listxattr) (struct dentry *, char *, size_t);
436 void (*update_time)(struct inode *inode, enum fs_update_time type,
438 void (*sync_lazytime)(struct inode *inode);
439 int (*atomic_open)(struct inode *, struct dentry *, struct file *,
441 int (*tmpfile) (struct mnt_idmap *, struct inode *, struct file *, umode_t);
442 struct posix_acl * (*get_acl)(struct mnt_idmap *, struct dentry *, int);
443 int (*set_acl)(struct mnt_idmap *, struct dentry *, struct posix_acl *, int);
444 int (*fileattr_set)(struct mnt_idmap *idmap,
445 struct dentry *dentry, struct file_kattr *fa);
446 int (*fileattr_get)(struct dentry *dentry, struct file_kattr *fa);
447 struct offset_ctx *(*get_offset_ctx)(struct inode *inode);
472 a struct "dentry_operations". This method is called with the
676 typically using the 'private' field in the 'struct page'. If such
741 ensure that the struct file's error cursor has advanced to the correct
745 struct address_space_operations
753 struct address_space_operations {
754 int (*read_folio)(struct file *, struct folio *);
755 int (*writepages)(struct address_space *, struct writeback_control *);
756 bool (*dirty_folio)(struct address_space *, struct folio *);
757 void (*readahead)(struct readahead_control *);
758 int (*write_begin)(const struct kiocb *, struct address_space *mapping,
760 struct page **pagep, void **fsdata);
761 int (*write_end)(const struct kiocb *, struct address_space *mapping,
763 struct folio *folio, void *fsdata);
764 sector_t (*bmap)(struct address_space *, sector_t);
765 void (*invalidate_folio) (struct folio *, size_t start, size_t len);
766 bool (*release_folio)(struct folio *, gfp_t);
767 void (*free_folio)(struct folio *);
768 ssize_t (*direct_IO)(struct kiocb *, struct iov_iter *iter);
769 int (*migrate_folio)(struct mapping *, struct folio *dst,
770 struct folio *src, enum migrate_mode);
771 int (*launder_folio) (struct folio *);
773 bool (*is_partially_uptodate) (struct folio *, size_t from,
775 void (*is_dirty_writeback)(struct folio *, bool *, bool *);
776 int (*error_remove_folio)(struct mapping *mapping, struct folio *);
777 int (*swap_activate)(struct swap_info_struct *sis, struct file *f, sector_t *span)
778 int (*swap_deactivate)(struct file *);
993 struct file_operations
1001 struct file_operations {
1002 struct module *owner;
1004 loff_t (*llseek) (struct file *, loff_t, int);
1005 ssize_t (*read) (struct file *, char __user *, size_t, loff_t *);
1006 ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);
1007 ssize_t (*read_iter) (struct kiocb *, struct iov_iter *);
1008 ssize_t (*write_iter) (struct kiocb *, struct iov_iter *);
1009 int (*iopoll)(struct kiocb *kiocb, struct io_comp_batch *,
1011 int (*iterate_shared) (struct file *, struct dir_context *);
1012 __poll_t (*poll) (struct file *, struct poll_table_struct *);
1013 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
1014 long (*compat_ioctl) (struct file *, unsigned int, unsigned long);
1015 int (*mmap) (struct file *, struct vm_area_struct *);
1016 int (*open) (struct inode *, struct file *);
1017 int (*flush) (struct file *, fl_owner_t id);
1018 int (*release) (struct inode *, struct file *);
1019 int (*fsync) (struct file *, loff_t, loff_t, int datasync);
1020 int (*fasync) (int, struct file *, int);
1021 int (*lock) (struct file *, int, struct file_lock *);
1022 …unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, uns…
1024 int (*flock) (struct file *, int, struct file_lock *);
1025 ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int);
1026 ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int);
1027 void (*splice_eof)(struct file *file);
1028 int (*setlease)(struct file *, int, struct file_lease **, void **);
1029 long (*fallocate)(struct file *file, int mode, loff_t offset,
1031 void (*show_fdinfo)(struct seq_file *m, struct file *f);
1033 unsigned (*mmap_capabilities)(struct file *);
1035 ssize_t (*copy_file_range)(struct file *, loff_t, struct file *,
1037 loff_t (*remap_file_range)(struct file *file_in, loff_t pos_in,
1038 struct file *file_out, loff_t pos_out,
1040 int (*fadvise)(struct file *, loff_t, loff_t, int);
1041 int (*uring_cmd)(struct io_uring_cmd *ioucmd, unsigned int issue_flags);
1042 int (*uring_cmd_iopoll)(struct io_uring_cmd *, struct io_comp_batch *,
1044 int (*mmap_prepare)(struct vm_area_desc *);
1089 opens a file, it creates a new "struct file". It then calls the
1091 think that the open method really belongs in "struct
1189 struct dentry_operations
1201 struct dentry_operations {
1202 int (*d_revalidate)(struct inode *, const struct qstr *,
1203 struct dentry *, unsigned int);
1204 int (*d_weak_revalidate)(struct dentry *, unsigned int);
1205 int (*d_hash)(const struct dentry *, struct qstr *);
1206 int (*d_compare)(const struct dentry *,
1207 unsigned int, const char *, const struct qstr *);
1208 int (*d_delete)(const struct dentry *);
1209 int (*d_init)(struct dentry *);
1210 void (*d_release)(struct dentry *);
1211 void (*d_iput)(struct dentry *, struct inode *);
1212 char *(*d_dname)(struct dentry *, char *, int);
1213 struct vfsmount *(*d_automount)(struct path *);
1214 int (*d_manage)(const struct path *, bool);
1215 struct dentry *(*d_real)(struct dentry *, enum d_real_type type);
1216 bool (*d_unalias_trylock)(const struct dentry *);
1217 void (*d_unalias_unlock)(const struct dentry *);
1323 static char *pipefs_dname(struct dentry *dent, char *buffer, int buflen)