2006-09-30 20:52:18 +02:00
|
|
|
/* fs/ internal definitions
|
|
|
|
|
*
|
|
|
|
|
* Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
|
|
|
|
|
* Written by David Howells (dhowells@redhat.com)
|
|
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
|
* as published by the Free Software Foundation; either version
|
|
|
|
|
* 2 of the License, or (at your option) any later version.
|
|
|
|
|
*/
|
|
|
|
|
|
2006-08-31 12:55:23 +02:00
|
|
|
struct super_block;
|
2011-03-17 22:08:28 -04:00
|
|
|
struct file_system_type;
|
2016-06-21 09:23:11 +10:00
|
|
|
struct iomap;
|
2016-09-19 11:24:49 +10:00
|
|
|
struct iomap_ops;
|
2008-11-14 10:39:24 +11:00
|
|
|
struct linux_binprm;
|
2009-03-29 19:00:13 -04:00
|
|
|
struct path;
|
2011-11-24 18:22:03 -05:00
|
|
|
struct mount;
|
2015-02-12 14:58:47 -08:00
|
|
|
struct shrink_control;
|
2006-08-31 12:55:23 +02:00
|
|
|
|
2006-09-30 20:52:18 +02:00
|
|
|
/*
|
|
|
|
|
* block_dev.c
|
|
|
|
|
*/
|
2006-09-30 20:45:40 +02:00
|
|
|
#ifdef CONFIG_BLOCK
|
2006-09-30 20:52:18 +02:00
|
|
|
extern void __init bdev_cache_init(void);
|
|
|
|
|
|
2009-04-27 16:43:51 +02:00
|
|
|
extern int __sync_blockdev(struct block_device *bdev, int wait);
|
|
|
|
|
|
2006-08-31 12:55:23 +02:00
|
|
|
#else
|
|
|
|
|
static inline void bdev_cache_init(void)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2009-04-27 16:43:51 +02:00
|
|
|
static inline int __sync_blockdev(struct block_device *bdev, int wait)
|
|
|
|
|
{
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
2006-09-30 20:45:40 +02:00
|
|
|
#endif
|
2006-08-29 19:06:07 +01:00
|
|
|
|
2014-10-09 15:26:55 -07:00
|
|
|
/*
|
|
|
|
|
* buffer.c
|
|
|
|
|
*/
|
|
|
|
|
extern void guard_bio_eod(int rw, struct bio *bio);
|
2016-06-21 09:23:11 +10:00
|
|
|
extern int __block_write_begin_int(struct page *page, loff_t pos, unsigned len,
|
|
|
|
|
get_block_t *get_block, struct iomap *iomap);
|
2014-10-09 15:26:55 -07:00
|
|
|
|
2006-09-30 20:52:18 +02:00
|
|
|
/*
|
|
|
|
|
* char_dev.c
|
|
|
|
|
*/
|
|
|
|
|
extern void __init chrdev_init(void);
|
|
|
|
|
|
2012-06-25 12:55:46 +01:00
|
|
|
/*
|
|
|
|
|
* namei.c
|
|
|
|
|
*/
|
2013-09-08 14:03:27 -04:00
|
|
|
extern int user_path_mountpoint_at(int, const char __user *, unsigned int, struct path *);
|
|
|
|
|
extern int vfs_path_lookup(struct dentry *, struct vfsmount *,
|
|
|
|
|
const char *, unsigned int, struct path *);
|
2012-06-25 12:55:46 +01:00
|
|
|
|
2006-09-30 20:52:18 +02:00
|
|
|
/*
|
|
|
|
|
* namespace.c
|
|
|
|
|
*/
|
2015-12-14 18:44:44 -05:00
|
|
|
extern void *copy_mount_options(const void __user *);
|
2014-08-28 11:26:03 -06:00
|
|
|
extern char *copy_mount_string(const void __user *);
|
2008-03-22 15:48:17 -04:00
|
|
|
|
2016-11-20 19:45:28 -05:00
|
|
|
extern struct vfsmount *lookup_mnt(const struct path *);
|
2011-01-17 01:35:23 -05:00
|
|
|
extern int finish_automount(struct vfsmount *, struct path *);
|
2008-03-22 15:48:17 -04:00
|
|
|
|
2011-11-21 12:11:31 +01:00
|
|
|
extern int sb_prepare_remount_readonly(struct super_block *);
|
2011-01-14 22:30:21 -05:00
|
|
|
|
2008-03-22 15:48:17 -04:00
|
|
|
extern void __init mnt_init(void);
|
2009-03-29 19:00:13 -04:00
|
|
|
|
2012-06-12 16:20:35 +02:00
|
|
|
extern int __mnt_want_write(struct vfsmount *);
|
|
|
|
|
extern int __mnt_want_write_file(struct file *);
|
|
|
|
|
extern void __mnt_drop_write(struct vfsmount *);
|
|
|
|
|
extern void __mnt_drop_write_file(struct file *);
|
2010-02-05 02:01:14 -05:00
|
|
|
|
2009-03-29 19:00:13 -04:00
|
|
|
/*
|
|
|
|
|
* fs_struct.c
|
|
|
|
|
*/
|
2013-03-01 23:51:07 -05:00
|
|
|
extern void chroot_fs_refs(const struct path *, const struct path *);
|
2009-04-26 20:25:56 +10:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* file_table.c
|
|
|
|
|
*/
|
2009-12-04 15:47:36 -05:00
|
|
|
extern struct file *get_empty_filp(void);
|
2009-05-07 03:12:29 -04:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* super.c
|
|
|
|
|
*/
|
|
|
|
|
extern int do_remount_sb(struct super_block *, int, void *, int);
|
2015-02-19 20:19:35 +03:00
|
|
|
extern bool trylock_super(struct super_block *sb);
|
2011-03-17 22:08:28 -04:00
|
|
|
extern struct dentry *mount_fs(struct file_system_type *,
|
|
|
|
|
int, const char *, void *);
|
2012-01-02 22:28:36 -05:00
|
|
|
extern struct super_block *user_get_super(dev_t);
|
2009-12-19 10:10:39 -05:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* open.c
|
|
|
|
|
*/
|
2011-02-23 17:44:09 -05:00
|
|
|
struct open_flags {
|
|
|
|
|
int open_flag;
|
2011-11-21 14:59:34 -05:00
|
|
|
umode_t mode;
|
2011-02-23 17:44:09 -05:00
|
|
|
int acc_mode;
|
|
|
|
|
int intent;
|
2013-06-11 08:23:01 +04:00
|
|
|
int lookup_flags;
|
2011-02-23 17:44:09 -05:00
|
|
|
};
|
2012-10-10 16:43:10 -04:00
|
|
|
extern struct file *do_filp_open(int dfd, struct filename *pathname,
|
2013-06-11 08:23:01 +04:00
|
|
|
const struct open_flags *op);
|
2011-03-11 12:08:24 -05:00
|
|
|
extern struct file *do_file_open_root(struct dentry *, struct vfsmount *,
|
2013-06-11 08:23:01 +04:00
|
|
|
const char *, const struct open_flags *);
|
2010-10-24 11:13:10 -04:00
|
|
|
|
2011-01-29 18:43:26 +05:30
|
|
|
extern long do_handle_open(int mountdirfd,
|
|
|
|
|
struct file_handle __user *ufh, int open_flag);
|
2012-05-21 17:30:15 +02:00
|
|
|
extern int open_check_o_direct(struct file *f);
|
2015-06-18 14:32:31 +01:00
|
|
|
extern int vfs_open(const struct path *, struct file *, const struct cred *);
|
2016-02-17 16:49:38 -08:00
|
|
|
extern struct file *filp_clone_open(struct file *);
|
2011-01-29 18:43:26 +05:30
|
|
|
|
2010-10-24 11:13:10 -04:00
|
|
|
/*
|
|
|
|
|
* inode.c
|
|
|
|
|
*/
|
2015-02-12 14:58:47 -08:00
|
|
|
extern long prune_icache_sb(struct super_block *sb, struct shrink_control *sc);
|
2012-11-26 16:29:51 -08:00
|
|
|
extern void inode_add_lru(struct inode *inode);
|
2016-08-03 13:44:27 +02:00
|
|
|
extern int dentry_needs_remove_privs(struct dentry *dentry);
|
2011-03-22 22:23:40 +11:00
|
|
|
|
2016-09-16 12:44:20 +02:00
|
|
|
extern bool __atime_needs_update(const struct path *, struct inode *, bool);
|
|
|
|
|
static inline bool atime_needs_update_rcu(const struct path *path,
|
|
|
|
|
struct inode *inode)
|
|
|
|
|
{
|
|
|
|
|
return __atime_needs_update(path, inode, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
extern bool atime_needs_update_rcu(const struct path *, struct inode *);
|
|
|
|
|
|
2011-03-22 22:23:41 +11:00
|
|
|
/*
|
|
|
|
|
* fs-writeback.c
|
|
|
|
|
*/
|
2015-03-04 14:07:22 -05:00
|
|
|
extern void inode_io_list_del(struct inode *inode);
|
2011-03-22 22:23:41 +11:00
|
|
|
|
2013-08-28 10:17:53 +10:00
|
|
|
extern long get_nr_dirty_inodes(void);
|
2010-10-29 05:49:13 -04:00
|
|
|
extern void evict_inodes(struct super_block *);
|
2011-02-24 17:25:47 +11:00
|
|
|
extern int invalidate_inodes(struct super_block *, bool);
|
2011-07-07 15:03:58 -04:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* dcache.c
|
|
|
|
|
*/
|
|
|
|
|
extern struct dentry *__d_alloc(struct super_block *, const struct qstr *);
|
2013-09-05 14:39:11 +02:00
|
|
|
extern int d_set_mounted(struct dentry *dentry);
|
2015-02-12 14:58:47 -08:00
|
|
|
extern long prune_dcache_sb(struct super_block *sb, struct shrink_control *sc);
|
2016-06-10 11:32:47 -04:00
|
|
|
extern struct dentry *d_alloc_cursor(struct dentry *);
|
2013-03-20 13:19:30 -04:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* read_write.c
|
|
|
|
|
*/
|
2013-06-19 15:26:04 +04:00
|
|
|
extern int rw_verify_area(int, struct file *, const loff_t *, size_t);
|
2013-03-12 09:58:10 -04:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* pipe.c
|
|
|
|
|
*/
|
|
|
|
|
extern const struct file_operations pipefifo_fops;
|
2014-05-21 18:22:52 -04:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* fs_pin.c
|
|
|
|
|
*/
|
2015-01-11 10:57:27 -05:00
|
|
|
extern void group_pin_kill(struct hlist_head *p);
|
2014-05-21 18:22:52 -04:00
|
|
|
extern void mnt_pin_kill(struct mount *m);
|
2014-11-01 10:57:28 -04:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* fs/nsfs.c
|
|
|
|
|
*/
|
2016-09-15 00:15:34 +02:00
|
|
|
extern const struct dentry_operations ns_dentry_operations;
|
2016-01-07 09:53:30 -05:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* fs/ioctl.c
|
|
|
|
|
*/
|
|
|
|
|
extern int do_vfs_ioctl(struct file *file, unsigned int fd, unsigned int cmd,
|
|
|
|
|
unsigned long arg);
|
|
|
|
|
extern long vfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
|
2016-09-19 11:24:49 +10:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* iomap support:
|
|
|
|
|
*/
|
|
|
|
|
typedef loff_t (*iomap_actor_t)(struct inode *inode, loff_t pos, loff_t len,
|
|
|
|
|
void *data, struct iomap *iomap);
|
|
|
|
|
|
|
|
|
|
loff_t iomap_apply(struct inode *inode, loff_t pos, loff_t length,
|
|
|
|
|
unsigned flags, struct iomap_ops *ops, void *data,
|
|
|
|
|
iomap_actor_t actor);
|
2016-11-30 14:33:53 +11:00
|
|
|
|
|
|
|
|
/* direct-io.c: */
|
|
|
|
|
int sb_init_dio_done_wq(struct super_block *sb);
|