diff options
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 54 |
1 files changed, 30 insertions, 24 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 3b534e527e09..a36ffa5a77a4 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -710,6 +710,9 @@ static inline int mapping_writably_mapped(struct address_space *mapping) | |||
710 | #define i_size_ordered_init(inode) do { } while (0) | 710 | #define i_size_ordered_init(inode) do { } while (0) |
711 | #endif | 711 | #endif |
712 | 712 | ||
713 | struct posix_acl; | ||
714 | #define ACL_NOT_CACHED ((void *)(-1)) | ||
715 | |||
713 | struct inode { | 716 | struct inode { |
714 | struct hlist_node i_hash; | 717 | struct hlist_node i_hash; |
715 | struct list_head i_list; | 718 | struct list_head i_list; |
@@ -729,8 +732,8 @@ struct inode { | |||
729 | struct timespec i_atime; | 732 | struct timespec i_atime; |
730 | struct timespec i_mtime; | 733 | struct timespec i_mtime; |
731 | struct timespec i_ctime; | 734 | struct timespec i_ctime; |
732 | unsigned int i_blkbits; | ||
733 | blkcnt_t i_blocks; | 735 | blkcnt_t i_blocks; |
736 | unsigned int i_blkbits; | ||
734 | unsigned short i_bytes; | 737 | unsigned short i_bytes; |
735 | umode_t i_mode; | 738 | umode_t i_mode; |
736 | spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ | 739 | spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ |
@@ -751,13 +754,12 @@ struct inode { | |||
751 | struct block_device *i_bdev; | 754 | struct block_device *i_bdev; |
752 | struct cdev *i_cdev; | 755 | struct cdev *i_cdev; |
753 | }; | 756 | }; |
754 | int i_cindex; | ||
755 | 757 | ||
756 | __u32 i_generation; | 758 | __u32 i_generation; |
757 | 759 | ||
758 | #ifdef CONFIG_DNOTIFY | 760 | #ifdef CONFIG_FSNOTIFY |
759 | unsigned long i_dnotify_mask; /* Directory notify events */ | 761 | __u32 i_fsnotify_mask; /* all events this inode cares about */ |
760 | struct dnotify_struct *i_dnotify; /* for directory notifications */ | 762 | struct hlist_head i_fsnotify_mark_entries; /* fsnotify mark entries */ |
761 | #endif | 763 | #endif |
762 | 764 | ||
763 | #ifdef CONFIG_INOTIFY | 765 | #ifdef CONFIG_INOTIFY |
@@ -774,6 +776,10 @@ struct inode { | |||
774 | #ifdef CONFIG_SECURITY | 776 | #ifdef CONFIG_SECURITY |
775 | void *i_security; | 777 | void *i_security; |
776 | #endif | 778 | #endif |
779 | #ifdef CONFIG_FS_POSIX_ACL | ||
780 | struct posix_acl *i_acl; | ||
781 | struct posix_acl *i_default_acl; | ||
782 | #endif | ||
777 | void *i_private; /* fs or device private pointer */ | 783 | void *i_private; /* fs or device private pointer */ |
778 | }; | 784 | }; |
779 | 785 | ||
@@ -880,7 +886,7 @@ struct file_ra_state { | |||
880 | there are only # of pages ahead */ | 886 | there are only # of pages ahead */ |
881 | 887 | ||
882 | unsigned int ra_pages; /* Maximum readahead window */ | 888 | unsigned int ra_pages; /* Maximum readahead window */ |
883 | int mmap_miss; /* Cache miss stat for mmap accesses */ | 889 | unsigned int mmap_miss; /* Cache miss stat for mmap accesses */ |
884 | loff_t prev_pos; /* Cache last read() position */ | 890 | loff_t prev_pos; /* Cache last read() position */ |
885 | }; | 891 | }; |
886 | 892 | ||
@@ -1108,6 +1114,7 @@ extern void locks_copy_lock(struct file_lock *, struct file_lock *); | |||
1108 | extern void __locks_copy_lock(struct file_lock *, const struct file_lock *); | 1114 | extern void __locks_copy_lock(struct file_lock *, const struct file_lock *); |
1109 | extern void locks_remove_posix(struct file *, fl_owner_t); | 1115 | extern void locks_remove_posix(struct file *, fl_owner_t); |
1110 | extern void locks_remove_flock(struct file *); | 1116 | extern void locks_remove_flock(struct file *); |
1117 | extern void locks_release_private(struct file_lock *); | ||
1111 | extern void posix_test_lock(struct file *, struct file_lock *); | 1118 | extern void posix_test_lock(struct file *, struct file_lock *); |
1112 | extern int posix_lock_file(struct file *, struct file_lock *, struct file_lock *); | 1119 | extern int posix_lock_file(struct file *, struct file_lock *, struct file_lock *); |
1113 | extern int posix_lock_file_wait(struct file *, struct file_lock *); | 1120 | extern int posix_lock_file_wait(struct file *, struct file_lock *); |
@@ -1321,7 +1328,7 @@ struct super_block { | |||
1321 | struct rw_semaphore s_umount; | 1328 | struct rw_semaphore s_umount; |
1322 | struct mutex s_lock; | 1329 | struct mutex s_lock; |
1323 | int s_count; | 1330 | int s_count; |
1324 | int s_need_sync_fs; | 1331 | int s_need_sync; |
1325 | atomic_t s_active; | 1332 | atomic_t s_active; |
1326 | #ifdef CONFIG_SECURITY | 1333 | #ifdef CONFIG_SECURITY |
1327 | void *s_security; | 1334 | void *s_security; |
@@ -1372,11 +1379,6 @@ struct super_block { | |||
1372 | * generic_show_options() | 1379 | * generic_show_options() |
1373 | */ | 1380 | */ |
1374 | char *s_options; | 1381 | char *s_options; |
1375 | |||
1376 | /* | ||
1377 | * storage for asynchronous operations | ||
1378 | */ | ||
1379 | struct list_head s_async_list; | ||
1380 | }; | 1382 | }; |
1381 | 1383 | ||
1382 | extern struct timespec current_fs_time(struct super_block *sb); | 1384 | extern struct timespec current_fs_time(struct super_block *sb); |
@@ -1800,7 +1802,7 @@ extern struct vfsmount *kern_mount_data(struct file_system_type *, void *data); | |||
1800 | extern int may_umount_tree(struct vfsmount *); | 1802 | extern int may_umount_tree(struct vfsmount *); |
1801 | extern int may_umount(struct vfsmount *); | 1803 | extern int may_umount(struct vfsmount *); |
1802 | extern long do_mount(char *, char *, char *, unsigned long, void *); | 1804 | extern long do_mount(char *, char *, char *, unsigned long, void *); |
1803 | extern struct vfsmount *collect_mounts(struct vfsmount *, struct dentry *); | 1805 | extern struct vfsmount *collect_mounts(struct path *); |
1804 | extern void drop_collected_mounts(struct vfsmount *); | 1806 | extern void drop_collected_mounts(struct vfsmount *); |
1805 | 1807 | ||
1806 | extern int vfs_statfs(struct dentry *, struct kstatfs *); | 1808 | extern int vfs_statfs(struct dentry *, struct kstatfs *); |
@@ -1911,6 +1913,8 @@ static inline int break_lease(struct inode *inode, unsigned int mode) | |||
1911 | 1913 | ||
1912 | extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs, | 1914 | extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs, |
1913 | struct file *filp); | 1915 | struct file *filp); |
1916 | extern int do_fallocate(struct file *file, int mode, loff_t offset, | ||
1917 | loff_t len); | ||
1914 | extern long do_sys_open(int dfd, const char __user *filename, int flags, | 1918 | extern long do_sys_open(int dfd, const char __user *filename, int flags, |
1915 | int mode); | 1919 | int mode); |
1916 | extern struct file *filp_open(const char *, int, int); | 1920 | extern struct file *filp_open(const char *, int, int); |
@@ -1919,14 +1923,19 @@ extern struct file * dentry_open(struct dentry *, struct vfsmount *, int, | |||
1919 | extern int filp_close(struct file *, fl_owner_t id); | 1923 | extern int filp_close(struct file *, fl_owner_t id); |
1920 | extern char * getname(const char __user *); | 1924 | extern char * getname(const char __user *); |
1921 | 1925 | ||
1926 | /* fs/ioctl.c */ | ||
1927 | |||
1928 | extern int ioctl_preallocate(struct file *filp, void __user *argp); | ||
1929 | |||
1922 | /* fs/dcache.c */ | 1930 | /* fs/dcache.c */ |
1923 | extern void __init vfs_caches_init_early(void); | 1931 | extern void __init vfs_caches_init_early(void); |
1924 | extern void __init vfs_caches_init(unsigned long); | 1932 | extern void __init vfs_caches_init(unsigned long); |
1925 | 1933 | ||
1926 | extern struct kmem_cache *names_cachep; | 1934 | extern struct kmem_cache *names_cachep; |
1927 | 1935 | ||
1928 | #define __getname() kmem_cache_alloc(names_cachep, GFP_KERNEL) | 1936 | #define __getname_gfp(gfp) kmem_cache_alloc(names_cachep, (gfp)) |
1929 | #define __putname(name) kmem_cache_free(names_cachep, (void *)(name)) | 1937 | #define __getname() __getname_gfp(GFP_KERNEL) |
1938 | #define __putname(name) kmem_cache_free(names_cachep, (void *)(name)) | ||
1930 | #ifndef CONFIG_AUDITSYSCALL | 1939 | #ifndef CONFIG_AUDITSYSCALL |
1931 | #define putname(name) __putname(name) | 1940 | #define putname(name) __putname(name) |
1932 | #else | 1941 | #else |
@@ -1937,6 +1946,7 @@ extern void putname(const char *name); | |||
1937 | extern int register_blkdev(unsigned int, const char *); | 1946 | extern int register_blkdev(unsigned int, const char *); |
1938 | extern void unregister_blkdev(unsigned int, const char *); | 1947 | extern void unregister_blkdev(unsigned int, const char *); |
1939 | extern struct block_device *bdget(dev_t); | 1948 | extern struct block_device *bdget(dev_t); |
1949 | extern struct block_device *bdgrab(struct block_device *bdev); | ||
1940 | extern void bd_set_size(struct block_device *, loff_t size); | 1950 | extern void bd_set_size(struct block_device *, loff_t size); |
1941 | extern void bd_forget(struct inode *inode); | 1951 | extern void bd_forget(struct inode *inode); |
1942 | extern void bdput(struct block_device *); | 1952 | extern void bdput(struct block_device *); |
@@ -1947,8 +1957,6 @@ extern struct super_block *freeze_bdev(struct block_device *); | |||
1947 | extern void emergency_thaw_all(void); | 1957 | extern void emergency_thaw_all(void); |
1948 | extern int thaw_bdev(struct block_device *bdev, struct super_block *sb); | 1958 | extern int thaw_bdev(struct block_device *bdev, struct super_block *sb); |
1949 | extern int fsync_bdev(struct block_device *); | 1959 | extern int fsync_bdev(struct block_device *); |
1950 | extern int fsync_super(struct super_block *); | ||
1951 | extern int fsync_no_super(struct block_device *); | ||
1952 | #else | 1960 | #else |
1953 | static inline void bd_forget(struct inode *inode) {} | 1961 | static inline void bd_forget(struct inode *inode) {} |
1954 | static inline int sync_blockdev(struct block_device *bdev) { return 0; } | 1962 | static inline int sync_blockdev(struct block_device *bdev) { return 0; } |
@@ -1964,6 +1972,7 @@ static inline int thaw_bdev(struct block_device *bdev, struct super_block *sb) | |||
1964 | return 0; | 1972 | return 0; |
1965 | } | 1973 | } |
1966 | #endif | 1974 | #endif |
1975 | extern int sync_filesystem(struct super_block *); | ||
1967 | extern const struct file_operations def_blk_fops; | 1976 | extern const struct file_operations def_blk_fops; |
1968 | extern const struct file_operations def_chr_fops; | 1977 | extern const struct file_operations def_chr_fops; |
1969 | extern const struct file_operations bad_sock_fops; | 1978 | extern const struct file_operations bad_sock_fops; |
@@ -2043,9 +2052,6 @@ extern int __invalidate_device(struct block_device *); | |||
2043 | extern int invalidate_partition(struct gendisk *, int); | 2052 | extern int invalidate_partition(struct gendisk *, int); |
2044 | #endif | 2053 | #endif |
2045 | extern int invalidate_inodes(struct super_block *); | 2054 | extern int invalidate_inodes(struct super_block *); |
2046 | unsigned long __invalidate_mapping_pages(struct address_space *mapping, | ||
2047 | pgoff_t start, pgoff_t end, | ||
2048 | bool be_atomic); | ||
2049 | unsigned long invalidate_mapping_pages(struct address_space *mapping, | 2055 | unsigned long invalidate_mapping_pages(struct address_space *mapping, |
2050 | pgoff_t start, pgoff_t end); | 2056 | pgoff_t start, pgoff_t end); |
2051 | 2057 | ||
@@ -2082,12 +2088,8 @@ extern int filemap_fdatawrite_range(struct address_space *mapping, | |||
2082 | 2088 | ||
2083 | extern int vfs_fsync(struct file *file, struct dentry *dentry, int datasync); | 2089 | extern int vfs_fsync(struct file *file, struct dentry *dentry, int datasync); |
2084 | extern void sync_supers(void); | 2090 | extern void sync_supers(void); |
2085 | extern void sync_filesystems(int wait); | ||
2086 | extern void __fsync_super(struct super_block *sb); | ||
2087 | extern void emergency_sync(void); | 2091 | extern void emergency_sync(void); |
2088 | extern void emergency_remount(void); | 2092 | extern void emergency_remount(void); |
2089 | extern int do_remount_sb(struct super_block *sb, int flags, | ||
2090 | void *data, int force); | ||
2091 | #ifdef CONFIG_BLOCK | 2093 | #ifdef CONFIG_BLOCK |
2092 | extern sector_t bmap(struct inode *, sector_t); | 2094 | extern sector_t bmap(struct inode *, sector_t); |
2093 | #endif | 2095 | #endif |
@@ -2205,6 +2207,8 @@ extern int generic_segment_checks(const struct iovec *iov, | |||
2205 | /* fs/splice.c */ | 2207 | /* fs/splice.c */ |
2206 | extern ssize_t generic_file_splice_read(struct file *, loff_t *, | 2208 | extern ssize_t generic_file_splice_read(struct file *, loff_t *, |
2207 | struct pipe_inode_info *, size_t, unsigned int); | 2209 | struct pipe_inode_info *, size_t, unsigned int); |
2210 | extern ssize_t default_file_splice_read(struct file *, loff_t *, | ||
2211 | struct pipe_inode_info *, size_t, unsigned int); | ||
2208 | extern ssize_t generic_file_splice_write(struct pipe_inode_info *, | 2212 | extern ssize_t generic_file_splice_write(struct pipe_inode_info *, |
2209 | struct file *, loff_t *, size_t, unsigned int); | 2213 | struct file *, loff_t *, size_t, unsigned int); |
2210 | extern ssize_t generic_splice_sendpage(struct pipe_inode_info *pipe, | 2214 | extern ssize_t generic_splice_sendpage(struct pipe_inode_info *pipe, |
@@ -2354,6 +2358,8 @@ extern void simple_release_fs(struct vfsmount **mount, int *count); | |||
2354 | extern ssize_t simple_read_from_buffer(void __user *to, size_t count, | 2358 | extern ssize_t simple_read_from_buffer(void __user *to, size_t count, |
2355 | loff_t *ppos, const void *from, size_t available); | 2359 | loff_t *ppos, const void *from, size_t available); |
2356 | 2360 | ||
2361 | extern int simple_fsync(struct file *, struct dentry *, int); | ||
2362 | |||
2357 | #ifdef CONFIG_MIGRATION | 2363 | #ifdef CONFIG_MIGRATION |
2358 | extern int buffer_migrate_page(struct address_space *, | 2364 | extern int buffer_migrate_page(struct address_space *, |
2359 | struct page *, struct page *); | 2365 | struct page *, struct page *); |