Lines Matching full: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
107 struct file_system_type
115 struct file_system_type {
118 int (*init_fs_context)(struct fs_context *);
119 const struct fs_parameter_spec *parameters;
120 struct dentry *(*mount) (struct file_system_type *, int,
122 void (*kill_sb) (struct super_block *);
123 struct module *owner;
124 struct file_system_type * next;
125 struct hlist_head fs_supers;
127 struct lock_class_key s_lock_key;
128 struct lock_class_key s_umount_key;
129 struct lock_class_key s_vfs_rename_key;
130 struct lock_class_key s_writers_key[SB_FREEZE_LEVELS];
132 struct lock_class_key i_lock_key;
133 struct lock_class_key i_mutex_key;
134 struct lock_class_key invalidate_lock_key;
135 struct lock_class_key i_mutex_dir_key;
146 Initializes 'struct fs_context' ->ops and ->fs_private fields with
151 'struct fs_parameter_spec'.
178 ``struct file_system_type *fs_type``
199 suitable filesystem image the method creates and initializes struct
208 method fills in is the "s_op" field. This is a pointer to a "struct
226 ``struct super_block *sb``
244 struct super_operations
252 struct super_operations {
253 struct inode *(*alloc_inode)(struct super_block *sb);
254 void (*destroy_inode)(struct inode *);
255 void (*free_inode)(struct inode *);
257 void (*dirty_inode) (struct inode *, int flags);
258 int (*write_inode) (struct inode *, struct writeback_control *wbc);
259 int (*drop_inode) (struct inode *);
260 void (*evict_inode) (struct inode *);
261 void (*put_super) (struct super_block *);
262 int (*sync_fs)(struct super_block *sb, int wait);
263 int (*freeze_super) (struct super_block *sb,
265 int (*freeze_fs) (struct super_block *);
266 int (*thaw_super) (struct super_block *sb,
268 int (*unfreeze_fs) (struct super_block *);
269 int (*statfs) (struct dentry *, struct kstatfs *);
270 int (*remount_fs) (struct super_block *, int *, char *);
271 void (*umount_begin) (struct super_block *);
273 int (*show_options)(struct seq_file *, struct dentry *);
274 int (*show_devname)(struct seq_file *, struct dentry *);
275 int (*show_path)(struct seq_file *, struct dentry *);
276 int (*show_stats)(struct seq_file *, struct dentry *);
278 ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t);
279 ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t);
280 struct dquot **(*get_dquots)(struct inode *);
282 long (*nr_cached_objects)(struct super_block *,
283 struct shrink_control *);
284 long (*free_cached_objects)(struct super_block *,
285 struct shrink_control *);
295 struct inode and initialize it. If this function is not
296 defined, a simple 'struct inode' is allocated. Normally
298 contains a 'struct inode' embedded within it.
302 allocated for struct inode. It is only required if
308 in ->destroy_inode to free 'struct inode' memory, then it's
317 and struct inode has times updated since the last ->dirty_inode
392 '(struct mount).mnt_devname' will be used.
409 called by quota to get 'struct dquot' array for a particular inode.
436 field. This is a pointer to a "struct inode_operations" which describes
440 struct xattr_handler
484 struct inode_operations
492 struct inode_operations {
493 int (*create) (struct mnt_idmap *, struct inode *,struct dentry *, umode_t, bool);
494 struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int);
495 int (*link) (struct dentry *,struct inode *,struct dentry *);
496 int (*unlink) (struct inode *,struct dentry *);
497 int (*symlink) (struct mnt_idmap *, struct inode *,struct dentry *,const char *);
498 int (*mkdir) (struct mnt_idmap *, struct inode *,struct dentry *,umode_t);
499 int (*rmdir) (struct inode *,struct dentry *);
500 int (*mknod) (struct mnt_idmap *, struct inode *,struct dentry *,umode_t,dev_t);
501 int (*rename) (struct mnt_idmap *, struct inode *, struct dentry *,
502 struct inode *, struct dentry *, unsigned int);
503 int (*readlink) (struct dentry *, char __user *,int);
504 const char *(*get_link) (struct dentry *, struct inode *,
505 struct delayed_call *);
506 int (*permission) (struct mnt_idmap *, struct inode *, int);
507 struct posix_acl * (*get_inode_acl)(struct inode *, int, bool);
508 int (*setattr) (struct mnt_idmap *, struct dentry *, struct iattr *);
509 int (*getattr) (struct mnt_idmap *, const struct path *, struct kstat *, u32, unsigned int);
510 ssize_t (*listxattr) (struct dentry *, char *, size_t);
511 void (*update_time)(struct inode *, struct timespec *, int);
512 int (*atomic_open)(struct inode *, struct dentry *, struct file *,
514 int (*tmpfile) (struct mnt_idmap *, struct inode *, struct file *, umode_t);
515 struct posix_acl * (*get_acl)(struct mnt_idmap *, struct dentry *, int);
516 int (*set_acl)(struct mnt_idmap *, struct dentry *, struct posix_acl *, int);
517 int (*fileattr_set)(struct mnt_idmap *idmap,
518 struct dentry *dentry, struct fileattr *fa);
519 int (*fileattr_get)(struct dentry *dentry, struct fileattr *fa);
520 struct offset_ctx *(*get_offset_ctx)(struct inode *inode);
545 a struct "dentry_operations". This method is called with the
726 typically using the 'private' field in the 'struct page'. If such
790 ensure that the struct file's error cursor has advanced to the correct
794 struct address_space_operations
802 struct address_space_operations {
803 int (*writepage)(struct page *page, struct writeback_control *wbc);
804 int (*read_folio)(struct file *, struct folio *);
805 int (*writepages)(struct address_space *, struct writeback_control *);
806 bool (*dirty_folio)(struct address_space *, struct folio *);
807 void (*readahead)(struct readahead_control *);
808 int (*write_begin)(struct file *, struct address_space *mapping,
810 struct page **pagep, void **fsdata);
811 int (*write_end)(struct file *, struct address_space *mapping,
813 struct folio *folio, void *fsdata);
814 sector_t (*bmap)(struct address_space *, sector_t);
815 void (*invalidate_folio) (struct folio *, size_t start, size_t len);
816 bool (*release_folio)(struct folio *, gfp_t);
817 void (*free_folio)(struct folio *);
818 ssize_t (*direct_IO)(struct kiocb *, struct iov_iter *iter);
819 int (*migrate_folio)(struct mapping *, struct folio *dst,
820 struct folio *src, enum migrate_mode);
821 int (*launder_folio) (struct folio *);
823 bool (*is_partially_uptodate) (struct folio *, size_t from,
825 void (*is_dirty_writeback)(struct folio *, bool *, bool *);
826 int (*error_remove_folio)(struct mapping *mapping, struct folio *);
827 int (*swap_activate)(struct swap_info_struct *sis, struct file *f, sector_t *span)
828 int (*swap_deactivate)(struct file *);
829 int (*swap_rw)(struct kiocb *iocb, struct iov_iter *iter);
1066 struct file_operations
1074 struct file_operations {
1075 struct module *owner;
1076 loff_t (*llseek) (struct file *, loff_t, int);
1077 ssize_t (*read) (struct file *, char __user *, size_t, loff_t *);
1078 ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);
1079 ssize_t (*read_iter) (struct kiocb *, struct iov_iter *);
1080 ssize_t (*write_iter) (struct kiocb *, struct iov_iter *);
1081 int (*iopoll)(struct kiocb *kiocb, bool spin);
1082 int (*iterate_shared) (struct file *, struct dir_context *);
1083 __poll_t (*poll) (struct file *, struct poll_table_struct *);
1084 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
1085 long (*compat_ioctl) (struct file *, unsigned int, unsigned long);
1086 int (*mmap) (struct file *, struct vm_area_struct *);
1087 int (*open) (struct inode *, struct file *);
1088 int (*flush) (struct file *, fl_owner_t id);
1089 int (*release) (struct inode *, struct file *);
1090 int (*fsync) (struct file *, loff_t, loff_t, int datasync);
1091 int (*fasync) (int, struct file *, int);
1092 int (*lock) (struct file *, int, struct file_lock *);
1093 …unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, uns…
1095 int (*flock) (struct file *, int, struct file_lock *);
1096 ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int);
1097 ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int);
1098 int (*setlease)(struct file *, long, struct file_lock **, void **);
1099 long (*fallocate)(struct file *file, int mode, loff_t offset,
1101 void (*show_fdinfo)(struct seq_file *m, struct file *f);
1103 unsigned (*mmap_capabilities)(struct file *);
1105 ssize_t (*copy_file_range)(struct file *, loff_t, struct file *, loff_t, size_t, unsigned int);
1106 loff_t (*remap_file_range)(struct file *file_in, loff_t pos_in,
1107 struct file *file_out, loff_t pos_out,
1109 int (*fadvise)(struct file *, loff_t, loff_t, int);
1153 opens a file, it creates a new "struct file". It then calls the
1155 think that the open method really belongs in "struct
1241 struct dentry_operations
1253 struct dentry_operations {
1254 int (*d_revalidate)(struct dentry *, unsigned int);
1255 int (*d_weak_revalidate)(struct dentry *, unsigned int);
1256 int (*d_hash)(const struct dentry *, struct qstr *);
1257 int (*d_compare)(const struct dentry *,
1258 unsigned int, const char *, const struct qstr *);
1259 int (*d_delete)(const struct dentry *);
1260 int (*d_init)(struct dentry *);
1261 void (*d_release)(struct dentry *);
1262 void (*d_iput)(struct dentry *, struct inode *);
1263 char *(*d_dname)(struct dentry *, char *, int);
1264 struct vfsmount *(*d_automount)(struct path *);
1265 int (*d_manage)(const struct path *, bool);
1266 struct dentry *(*d_real)(struct dentry *, enum d_real_type type);
1372 static char *pipefs_dname(struct dentry *dent, char *buffer, int buflen)