diff options
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 53 |
1 files changed, 33 insertions, 20 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 73e9b643e455..90162fb3bf04 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -161,8 +161,8 @@ struct inodes_stat_t { | |||
161 | * These aren't really reads or writes, they pass down information about | 161 | * These aren't really reads or writes, they pass down information about |
162 | * parts of device that are now unused by the file system. | 162 | * parts of device that are now unused by the file system. |
163 | */ | 163 | */ |
164 | #define DISCARD_NOBARRIER (1 << BIO_RW_DISCARD) | 164 | #define DISCARD_NOBARRIER (WRITE | (1 << BIO_RW_DISCARD)) |
165 | #define DISCARD_BARRIER ((1 << BIO_RW_DISCARD) | (1 << BIO_RW_BARRIER)) | 165 | #define DISCARD_BARRIER (DISCARD_NOBARRIER | (1 << BIO_RW_BARRIER)) |
166 | 166 | ||
167 | #define SEL_IN 1 | 167 | #define SEL_IN 1 |
168 | #define SEL_OUT 2 | 168 | #define SEL_OUT 2 |
@@ -655,7 +655,6 @@ struct block_device { | |||
655 | int bd_invalidated; | 655 | int bd_invalidated; |
656 | struct gendisk * bd_disk; | 656 | struct gendisk * bd_disk; |
657 | struct list_head bd_list; | 657 | struct list_head bd_list; |
658 | struct backing_dev_info *bd_inode_backing_dev_info; | ||
659 | /* | 658 | /* |
660 | * Private data. You must have bd_claim'ed the block_device | 659 | * Private data. You must have bd_claim'ed the block_device |
661 | * to use this. NOTE: bd_claim allows an owner to claim | 660 | * to use this. NOTE: bd_claim allows an owner to claim |
@@ -715,7 +714,7 @@ struct posix_acl; | |||
715 | 714 | ||
716 | struct inode { | 715 | struct inode { |
717 | struct hlist_node i_hash; | 716 | struct hlist_node i_hash; |
718 | struct list_head i_list; | 717 | struct list_head i_list; /* backing dev IO list */ |
719 | struct list_head i_sb_list; | 718 | struct list_head i_sb_list; |
720 | struct list_head i_dentry; | 719 | struct list_head i_dentry; |
721 | unsigned long i_ino; | 720 | unsigned long i_ino; |
@@ -1336,9 +1335,6 @@ struct super_block { | |||
1336 | struct xattr_handler **s_xattr; | 1335 | struct xattr_handler **s_xattr; |
1337 | 1336 | ||
1338 | struct list_head s_inodes; /* all inodes */ | 1337 | struct list_head s_inodes; /* all inodes */ |
1339 | struct list_head s_dirty; /* dirty inodes */ | ||
1340 | struct list_head s_io; /* parked for writeback */ | ||
1341 | struct list_head s_more_io; /* parked for more writeback */ | ||
1342 | struct hlist_head s_anon; /* anonymous dentries for (nfs) exporting */ | 1338 | struct hlist_head s_anon; /* anonymous dentries for (nfs) exporting */ |
1343 | struct list_head s_files; | 1339 | struct list_head s_files; |
1344 | /* s_dentry_lru and s_nr_dentry_unused are protected by dcache_lock */ | 1340 | /* s_dentry_lru and s_nr_dentry_unused are protected by dcache_lock */ |
@@ -1346,6 +1342,7 @@ struct super_block { | |||
1346 | int s_nr_dentry_unused; /* # of dentry on lru */ | 1342 | int s_nr_dentry_unused; /* # of dentry on lru */ |
1347 | 1343 | ||
1348 | struct block_device *s_bdev; | 1344 | struct block_device *s_bdev; |
1345 | struct backing_dev_info *s_bdi; | ||
1349 | struct mtd_info *s_mtd; | 1346 | struct mtd_info *s_mtd; |
1350 | struct list_head s_instances; | 1347 | struct list_head s_instances; |
1351 | struct quota_info s_dquot; /* Diskquota specific options */ | 1348 | struct quota_info s_dquot; /* Diskquota specific options */ |
@@ -1458,11 +1455,6 @@ int fiemap_check_flags(struct fiemap_extent_info *fieinfo, u32 fs_flags); | |||
1458 | #define DT_SOCK 12 | 1455 | #define DT_SOCK 12 |
1459 | #define DT_WHT 14 | 1456 | #define DT_WHT 14 |
1460 | 1457 | ||
1461 | #define OSYNC_METADATA (1<<0) | ||
1462 | #define OSYNC_DATA (1<<1) | ||
1463 | #define OSYNC_INODE (1<<2) | ||
1464 | int generic_osync_inode(struct inode *, struct address_space *, int); | ||
1465 | |||
1466 | /* | 1458 | /* |
1467 | * This is the "filldir" function type, used by readdir() to let | 1459 | * This is the "filldir" function type, used by readdir() to let |
1468 | * the kernel specify what kind of dirent layout it wants to have. | 1460 | * the kernel specify what kind of dirent layout it wants to have. |
@@ -1528,6 +1520,7 @@ struct inode_operations { | |||
1528 | void (*put_link) (struct dentry *, struct nameidata *, void *); | 1520 | void (*put_link) (struct dentry *, struct nameidata *, void *); |
1529 | void (*truncate) (struct inode *); | 1521 | void (*truncate) (struct inode *); |
1530 | int (*permission) (struct inode *, int); | 1522 | int (*permission) (struct inode *, int); |
1523 | int (*check_acl)(struct inode *, int); | ||
1531 | int (*setattr) (struct dentry *, struct iattr *); | 1524 | int (*setattr) (struct dentry *, struct iattr *); |
1532 | int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *); | 1525 | int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *); |
1533 | int (*setxattr) (struct dentry *, const char *,const void *,size_t,int); | 1526 | int (*setxattr) (struct dentry *, const char *,const void *,size_t,int); |
@@ -1788,6 +1781,7 @@ extern int get_sb_pseudo(struct file_system_type *, char *, | |||
1788 | struct vfsmount *mnt); | 1781 | struct vfsmount *mnt); |
1789 | extern void simple_set_mnt(struct vfsmount *mnt, struct super_block *sb); | 1782 | extern void simple_set_mnt(struct vfsmount *mnt, struct super_block *sb); |
1790 | int __put_super_and_need_restart(struct super_block *sb); | 1783 | int __put_super_and_need_restart(struct super_block *sb); |
1784 | void put_super(struct super_block *sb); | ||
1791 | 1785 | ||
1792 | /* Alas, no aliases. Too much hassle with bringing module.h everywhere */ | 1786 | /* Alas, no aliases. Too much hassle with bringing module.h everywhere */ |
1793 | #define fops_get(fops) \ | 1787 | #define fops_get(fops) \ |
@@ -1998,12 +1992,25 @@ extern void bd_release_from_disk(struct block_device *, struct gendisk *); | |||
1998 | #define CHRDEV_MAJOR_HASH_SIZE 255 | 1992 | #define CHRDEV_MAJOR_HASH_SIZE 255 |
1999 | extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *); | 1993 | extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *); |
2000 | extern int register_chrdev_region(dev_t, unsigned, const char *); | 1994 | extern int register_chrdev_region(dev_t, unsigned, const char *); |
2001 | extern int register_chrdev(unsigned int, const char *, | 1995 | extern int __register_chrdev(unsigned int major, unsigned int baseminor, |
2002 | const struct file_operations *); | 1996 | unsigned int count, const char *name, |
2003 | extern void unregister_chrdev(unsigned int, const char *); | 1997 | const struct file_operations *fops); |
1998 | extern void __unregister_chrdev(unsigned int major, unsigned int baseminor, | ||
1999 | unsigned int count, const char *name); | ||
2004 | extern void unregister_chrdev_region(dev_t, unsigned); | 2000 | extern void unregister_chrdev_region(dev_t, unsigned); |
2005 | extern void chrdev_show(struct seq_file *,off_t); | 2001 | extern void chrdev_show(struct seq_file *,off_t); |
2006 | 2002 | ||
2003 | static inline int register_chrdev(unsigned int major, const char *name, | ||
2004 | const struct file_operations *fops) | ||
2005 | { | ||
2006 | return __register_chrdev(major, 0, 256, name, fops); | ||
2007 | } | ||
2008 | |||
2009 | static inline void unregister_chrdev(unsigned int major, const char *name) | ||
2010 | { | ||
2011 | __unregister_chrdev(major, 0, 256, name); | ||
2012 | } | ||
2013 | |||
2007 | /* fs/block_dev.c */ | 2014 | /* fs/block_dev.c */ |
2008 | #define BDEVNAME_SIZE 32 /* Largest string for a blockdev identifier */ | 2015 | #define BDEVNAME_SIZE 32 /* Largest string for a blockdev identifier */ |
2009 | #define BDEVT_SIZE 10 /* Largest string for MAJ:MIN for blkdev */ | 2016 | #define BDEVT_SIZE 10 /* Largest string for MAJ:MIN for blkdev */ |
@@ -2070,12 +2077,12 @@ static inline void invalidate_remote_inode(struct inode *inode) | |||
2070 | extern int invalidate_inode_pages2(struct address_space *mapping); | 2077 | extern int invalidate_inode_pages2(struct address_space *mapping); |
2071 | extern int invalidate_inode_pages2_range(struct address_space *mapping, | 2078 | extern int invalidate_inode_pages2_range(struct address_space *mapping, |
2072 | pgoff_t start, pgoff_t end); | 2079 | pgoff_t start, pgoff_t end); |
2073 | extern void generic_sync_sb_inodes(struct super_block *sb, | ||
2074 | struct writeback_control *wbc); | ||
2075 | extern int write_inode_now(struct inode *, int); | 2080 | extern int write_inode_now(struct inode *, int); |
2076 | extern int filemap_fdatawrite(struct address_space *); | 2081 | extern int filemap_fdatawrite(struct address_space *); |
2077 | extern int filemap_flush(struct address_space *); | 2082 | extern int filemap_flush(struct address_space *); |
2078 | extern int filemap_fdatawait(struct address_space *); | 2083 | extern int filemap_fdatawait(struct address_space *); |
2084 | extern int filemap_fdatawait_range(struct address_space *, loff_t lstart, | ||
2085 | loff_t lend); | ||
2079 | extern int filemap_write_and_wait(struct address_space *mapping); | 2086 | extern int filemap_write_and_wait(struct address_space *mapping); |
2080 | extern int filemap_write_and_wait_range(struct address_space *mapping, | 2087 | extern int filemap_write_and_wait_range(struct address_space *mapping, |
2081 | loff_t lstart, loff_t lend); | 2088 | loff_t lstart, loff_t lend); |
@@ -2086,7 +2093,10 @@ extern int __filemap_fdatawrite_range(struct address_space *mapping, | |||
2086 | extern int filemap_fdatawrite_range(struct address_space *mapping, | 2093 | extern int filemap_fdatawrite_range(struct address_space *mapping, |
2087 | loff_t start, loff_t end); | 2094 | loff_t start, loff_t end); |
2088 | 2095 | ||
2096 | extern int vfs_fsync_range(struct file *file, struct dentry *dentry, | ||
2097 | loff_t start, loff_t end, int datasync); | ||
2089 | extern int vfs_fsync(struct file *file, struct dentry *dentry, int datasync); | 2098 | extern int vfs_fsync(struct file *file, struct dentry *dentry, int datasync); |
2099 | extern int generic_write_sync(struct file *file, loff_t pos, loff_t count); | ||
2090 | extern void sync_supers(void); | 2100 | extern void sync_supers(void); |
2091 | extern void emergency_sync(void); | 2101 | extern void emergency_sync(void); |
2092 | extern void emergency_remount(void); | 2102 | extern void emergency_remount(void); |
@@ -2186,16 +2196,15 @@ extern int bdev_read_only(struct block_device *); | |||
2186 | extern int set_blocksize(struct block_device *, int); | 2196 | extern int set_blocksize(struct block_device *, int); |
2187 | extern int sb_set_blocksize(struct super_block *, int); | 2197 | extern int sb_set_blocksize(struct super_block *, int); |
2188 | extern int sb_min_blocksize(struct super_block *, int); | 2198 | extern int sb_min_blocksize(struct super_block *, int); |
2189 | extern int sb_has_dirty_inodes(struct super_block *); | ||
2190 | 2199 | ||
2191 | extern int generic_file_mmap(struct file *, struct vm_area_struct *); | 2200 | extern int generic_file_mmap(struct file *, struct vm_area_struct *); |
2192 | extern int generic_file_readonly_mmap(struct file *, struct vm_area_struct *); | 2201 | extern int generic_file_readonly_mmap(struct file *, struct vm_area_struct *); |
2193 | extern int file_read_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size); | 2202 | extern int file_read_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size); |
2194 | int generic_write_checks(struct file *file, loff_t *pos, size_t *count, int isblk); | 2203 | int generic_write_checks(struct file *file, loff_t *pos, size_t *count, int isblk); |
2195 | extern ssize_t generic_file_aio_read(struct kiocb *, const struct iovec *, unsigned long, loff_t); | 2204 | extern ssize_t generic_file_aio_read(struct kiocb *, const struct iovec *, unsigned long, loff_t); |
2205 | extern ssize_t __generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long, | ||
2206 | loff_t *); | ||
2196 | extern ssize_t generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long, loff_t); | 2207 | extern ssize_t generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long, loff_t); |
2197 | extern ssize_t generic_file_aio_write_nolock(struct kiocb *, const struct iovec *, | ||
2198 | unsigned long, loff_t); | ||
2199 | extern ssize_t generic_file_direct_write(struct kiocb *, const struct iovec *, | 2208 | extern ssize_t generic_file_direct_write(struct kiocb *, const struct iovec *, |
2200 | unsigned long *, loff_t, loff_t *, size_t, size_t); | 2209 | unsigned long *, loff_t, loff_t *, size_t, size_t); |
2201 | extern ssize_t generic_file_buffered_write(struct kiocb *, const struct iovec *, | 2210 | extern ssize_t generic_file_buffered_write(struct kiocb *, const struct iovec *, |
@@ -2205,6 +2214,10 @@ extern ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t l | |||
2205 | extern int generic_segment_checks(const struct iovec *iov, | 2214 | extern int generic_segment_checks(const struct iovec *iov, |
2206 | unsigned long *nr_segs, size_t *count, int access_flags); | 2215 | unsigned long *nr_segs, size_t *count, int access_flags); |
2207 | 2216 | ||
2217 | /* fs/block_dev.c */ | ||
2218 | extern ssize_t blkdev_aio_write(struct kiocb *iocb, const struct iovec *iov, | ||
2219 | unsigned long nr_segs, loff_t pos); | ||
2220 | |||
2208 | /* fs/splice.c */ | 2221 | /* fs/splice.c */ |
2209 | extern ssize_t generic_file_splice_read(struct file *, loff_t *, | 2222 | extern ssize_t generic_file_splice_read(struct file *, loff_t *, |
2210 | struct pipe_inode_info *, size_t, unsigned int); | 2223 | struct pipe_inode_info *, size_t, unsigned int); |