Back to home page

LXR

 
 

    


0001 /* fs/ internal definitions
0002  *
0003  * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
0004  * Written by David Howells (dhowells@redhat.com)
0005  *
0006  * This program is free software; you can redistribute it and/or
0007  * modify it under the terms of the GNU General Public License
0008  * as published by the Free Software Foundation; either version
0009  * 2 of the License, or (at your option) any later version.
0010  */
0011 
0012 struct super_block;
0013 struct file_system_type;
0014 struct iomap;
0015 struct iomap_ops;
0016 struct linux_binprm;
0017 struct path;
0018 struct mount;
0019 struct shrink_control;
0020 
0021 /*
0022  * block_dev.c
0023  */
0024 #ifdef CONFIG_BLOCK
0025 extern void __init bdev_cache_init(void);
0026 
0027 extern int __sync_blockdev(struct block_device *bdev, int wait);
0028 
0029 #else
0030 static inline void bdev_cache_init(void)
0031 {
0032 }
0033 
0034 static inline int __sync_blockdev(struct block_device *bdev, int wait)
0035 {
0036     return 0;
0037 }
0038 #endif
0039 
0040 /*
0041  * buffer.c
0042  */
0043 extern void guard_bio_eod(int rw, struct bio *bio);
0044 extern int __block_write_begin_int(struct page *page, loff_t pos, unsigned len,
0045         get_block_t *get_block, struct iomap *iomap);
0046 
0047 /*
0048  * char_dev.c
0049  */
0050 extern void __init chrdev_init(void);
0051 
0052 /*
0053  * namei.c
0054  */
0055 extern int user_path_mountpoint_at(int, const char __user *, unsigned int, struct path *);
0056 extern int vfs_path_lookup(struct dentry *, struct vfsmount *,
0057                const char *, unsigned int, struct path *);
0058 
0059 /*
0060  * namespace.c
0061  */
0062 extern void *copy_mount_options(const void __user *);
0063 extern char *copy_mount_string(const void __user *);
0064 
0065 extern struct vfsmount *lookup_mnt(const struct path *);
0066 extern int finish_automount(struct vfsmount *, struct path *);
0067 
0068 extern int sb_prepare_remount_readonly(struct super_block *);
0069 
0070 extern void __init mnt_init(void);
0071 
0072 extern int __mnt_want_write(struct vfsmount *);
0073 extern int __mnt_want_write_file(struct file *);
0074 extern void __mnt_drop_write(struct vfsmount *);
0075 extern void __mnt_drop_write_file(struct file *);
0076 
0077 /*
0078  * fs_struct.c
0079  */
0080 extern void chroot_fs_refs(const struct path *, const struct path *);
0081 
0082 /*
0083  * file_table.c
0084  */
0085 extern struct file *get_empty_filp(void);
0086 
0087 /*
0088  * super.c
0089  */
0090 extern int do_remount_sb(struct super_block *, int, void *, int);
0091 extern bool trylock_super(struct super_block *sb);
0092 extern struct dentry *mount_fs(struct file_system_type *,
0093                    int, const char *, void *);
0094 extern struct super_block *user_get_super(dev_t);
0095 
0096 /*
0097  * open.c
0098  */
0099 struct open_flags {
0100     int open_flag;
0101     umode_t mode;
0102     int acc_mode;
0103     int intent;
0104     int lookup_flags;
0105 };
0106 extern struct file *do_filp_open(int dfd, struct filename *pathname,
0107         const struct open_flags *op);
0108 extern struct file *do_file_open_root(struct dentry *, struct vfsmount *,
0109         const char *, const struct open_flags *);
0110 
0111 extern long do_handle_open(int mountdirfd,
0112                struct file_handle __user *ufh, int open_flag);
0113 extern int open_check_o_direct(struct file *f);
0114 extern int vfs_open(const struct path *, struct file *, const struct cred *);
0115 extern struct file *filp_clone_open(struct file *);
0116 
0117 /*
0118  * inode.c
0119  */
0120 extern long prune_icache_sb(struct super_block *sb, struct shrink_control *sc);
0121 extern void inode_add_lru(struct inode *inode);
0122 extern int dentry_needs_remove_privs(struct dentry *dentry);
0123 
0124 extern bool __atime_needs_update(const struct path *, struct inode *, bool);
0125 static inline bool atime_needs_update_rcu(const struct path *path,
0126                       struct inode *inode)
0127 {
0128     return __atime_needs_update(path, inode, true);
0129 }
0130 
0131 extern bool atime_needs_update_rcu(const struct path *, struct inode *);
0132 
0133 /*
0134  * fs-writeback.c
0135  */
0136 extern void inode_io_list_del(struct inode *inode);
0137 
0138 extern long get_nr_dirty_inodes(void);
0139 extern void evict_inodes(struct super_block *);
0140 extern int invalidate_inodes(struct super_block *, bool);
0141 
0142 /*
0143  * dcache.c
0144  */
0145 extern struct dentry *__d_alloc(struct super_block *, const struct qstr *);
0146 extern int d_set_mounted(struct dentry *dentry);
0147 extern long prune_dcache_sb(struct super_block *sb, struct shrink_control *sc);
0148 extern struct dentry *d_alloc_cursor(struct dentry *);
0149 
0150 /*
0151  * read_write.c
0152  */
0153 extern int rw_verify_area(int, struct file *, const loff_t *, size_t);
0154 
0155 /*
0156  * pipe.c
0157  */
0158 extern const struct file_operations pipefifo_fops;
0159 
0160 /*
0161  * fs_pin.c
0162  */
0163 extern void group_pin_kill(struct hlist_head *p);
0164 extern void mnt_pin_kill(struct mount *m);
0165 
0166 /*
0167  * fs/nsfs.c
0168  */
0169 extern const struct dentry_operations ns_dentry_operations;
0170 
0171 /*
0172  * fs/ioctl.c
0173  */
0174 extern int do_vfs_ioctl(struct file *file, unsigned int fd, unsigned int cmd,
0175             unsigned long arg);
0176 extern long vfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
0177 
0178 /*
0179  * iomap support:
0180  */
0181 typedef loff_t (*iomap_actor_t)(struct inode *inode, loff_t pos, loff_t len,
0182         void *data, struct iomap *iomap);
0183 
0184 loff_t iomap_apply(struct inode *inode, loff_t pos, loff_t length,
0185         unsigned flags, struct iomap_ops *ops, void *data,
0186         iomap_actor_t actor);
0187 
0188 /* direct-io.c: */
0189 int sb_init_dio_done_wq(struct super_block *sb);