aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h51
1 files changed, 28 insertions, 23 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 39e3d117e3d9..0c5e1c5b03db 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -6,7 +6,6 @@
6 * structures etc. 6 * structures etc.
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/limits.h> 9#include <linux/limits.h>
11#include <linux/ioctl.h> 10#include <linux/ioctl.h>
12 11
@@ -377,7 +376,8 @@ struct address_space_operations {
377 struct page* (*get_xip_page)(struct address_space *, sector_t, 376 struct page* (*get_xip_page)(struct address_space *, sector_t,
378 int); 377 int);
379 /* migrate the contents of a page to the specified target */ 378 /* migrate the contents of a page to the specified target */
380 int (*migratepage) (struct page *, struct page *); 379 int (*migratepage) (struct address_space *,
380 struct page *, struct page *);
381}; 381};
382 382
383struct backing_dev_info; 383struct backing_dev_info;
@@ -392,7 +392,7 @@ struct address_space {
392 unsigned int truncate_count; /* Cover race condition with truncate */ 392 unsigned int truncate_count; /* Cover race condition with truncate */
393 unsigned long nrpages; /* number of total pages */ 393 unsigned long nrpages; /* number of total pages */
394 pgoff_t writeback_index;/* writeback starts here */ 394 pgoff_t writeback_index;/* writeback starts here */
395 struct address_space_operations *a_ops; /* methods */ 395 const struct address_space_operations *a_ops; /* methods */
396 unsigned long flags; /* error bits/gfp mask */ 396 unsigned long flags; /* error bits/gfp mask */
397 struct backing_dev_info *backing_dev_info; /* device readahead, etc */ 397 struct backing_dev_info *backing_dev_info; /* device readahead, etc */
398 spinlock_t private_lock; /* for use by the address_space */ 398 spinlock_t private_lock; /* for use by the address_space */
@@ -683,6 +683,7 @@ extern spinlock_t files_lock;
683#define FL_FLOCK 2 683#define FL_FLOCK 2
684#define FL_ACCESS 8 /* not trying to lock, just looking */ 684#define FL_ACCESS 8 /* not trying to lock, just looking */
685#define FL_LEASE 32 /* lease held on this file */ 685#define FL_LEASE 32 /* lease held on this file */
686#define FL_CLOSE 64 /* unlock on close */
686#define FL_SLEEP 128 /* A blocking lock */ 687#define FL_SLEEP 128 /* A blocking lock */
687 688
688/* 689/*
@@ -775,7 +776,6 @@ extern int posix_lock_file_conf(struct file *, struct file_lock *, struct file_l
775extern int posix_lock_file(struct file *, struct file_lock *); 776extern int posix_lock_file(struct file *, struct file_lock *);
776extern int posix_lock_file_wait(struct file *, struct file_lock *); 777extern int posix_lock_file_wait(struct file *, struct file_lock *);
777extern int posix_unblock_lock(struct file *, struct file_lock *); 778extern int posix_unblock_lock(struct file *, struct file_lock *);
778extern int posix_locks_deadlock(struct file_lock *, struct file_lock *);
779extern int flock_lock_file_wait(struct file *filp, struct file_lock *fl); 779extern int flock_lock_file_wait(struct file *filp, struct file_lock *fl);
780extern int __break_lease(struct inode *inode, unsigned int flags); 780extern int __break_lease(struct inode *inode, unsigned int flags);
781extern void lease_get_mtime(struct inode *, struct timespec *time); 781extern void lease_get_mtime(struct inode *, struct timespec *time);
@@ -783,7 +783,6 @@ extern int setlease(struct file *, long, struct file_lock **);
783extern int lease_modify(struct file_lock **, int); 783extern int lease_modify(struct file_lock **, int);
784extern int lock_may_read(struct inode *, loff_t start, unsigned long count); 784extern int lock_may_read(struct inode *, loff_t start, unsigned long count);
785extern int lock_may_write(struct inode *, loff_t start, unsigned long count); 785extern int lock_may_write(struct inode *, loff_t start, unsigned long count);
786extern void steal_locks(fl_owner_t from);
787 786
788struct fasync_struct { 787struct fasync_struct {
789 int magic; 788 int magic;
@@ -1026,7 +1025,7 @@ struct file_operations {
1026 long (*compat_ioctl) (struct file *, unsigned int, unsigned long); 1025 long (*compat_ioctl) (struct file *, unsigned int, unsigned long);
1027 int (*mmap) (struct file *, struct vm_area_struct *); 1026 int (*mmap) (struct file *, struct vm_area_struct *);
1028 int (*open) (struct inode *, struct file *); 1027 int (*open) (struct inode *, struct file *);
1029 int (*flush) (struct file *); 1028 int (*flush) (struct file *, fl_owner_t id);
1030 int (*release) (struct inode *, struct file *); 1029 int (*release) (struct inode *, struct file *);
1031 int (*fsync) (struct file *, struct dentry *, int datasync); 1030 int (*fsync) (struct file *, struct dentry *, int datasync);
1032 int (*aio_fsync) (struct kiocb *, int datasync); 1031 int (*aio_fsync) (struct kiocb *, int datasync);
@@ -1098,10 +1097,10 @@ struct super_operations {
1098 int (*sync_fs)(struct super_block *sb, int wait); 1097 int (*sync_fs)(struct super_block *sb, int wait);
1099 void (*write_super_lockfs) (struct super_block *); 1098 void (*write_super_lockfs) (struct super_block *);
1100 void (*unlockfs) (struct super_block *); 1099 void (*unlockfs) (struct super_block *);
1101 int (*statfs) (struct super_block *, struct kstatfs *); 1100 int (*statfs) (struct dentry *, struct kstatfs *);
1102 int (*remount_fs) (struct super_block *, int *, char *); 1101 int (*remount_fs) (struct super_block *, int *, char *);
1103 void (*clear_inode) (struct inode *); 1102 void (*clear_inode) (struct inode *);
1104 void (*umount_begin) (struct super_block *); 1103 void (*umount_begin) (struct vfsmount *, int);
1105 1104
1106 int (*show_options)(struct seq_file *, struct vfsmount *); 1105 int (*show_options)(struct seq_file *, struct vfsmount *);
1107 int (*show_stats)(struct seq_file *, struct vfsmount *); 1106 int (*show_stats)(struct seq_file *, struct vfsmount *);
@@ -1271,23 +1270,26 @@ find_exported_dentry(struct super_block *sb, void *obj, void *parent,
1271struct file_system_type { 1270struct file_system_type {
1272 const char *name; 1271 const char *name;
1273 int fs_flags; 1272 int fs_flags;
1274 struct super_block *(*get_sb) (struct file_system_type *, int, 1273 int (*get_sb) (struct file_system_type *, int,
1275 const char *, void *); 1274 const char *, void *, struct vfsmount *);
1276 void (*kill_sb) (struct super_block *); 1275 void (*kill_sb) (struct super_block *);
1277 struct module *owner; 1276 struct module *owner;
1278 struct file_system_type * next; 1277 struct file_system_type * next;
1279 struct list_head fs_supers; 1278 struct list_head fs_supers;
1280}; 1279};
1281 1280
1282struct super_block *get_sb_bdev(struct file_system_type *fs_type, 1281extern int get_sb_bdev(struct file_system_type *fs_type,
1283 int flags, const char *dev_name, void *data, 1282 int flags, const char *dev_name, void *data,
1284 int (*fill_super)(struct super_block *, void *, int)); 1283 int (*fill_super)(struct super_block *, void *, int),
1285struct super_block *get_sb_single(struct file_system_type *fs_type, 1284 struct vfsmount *mnt);
1285extern int get_sb_single(struct file_system_type *fs_type,
1286 int flags, void *data, 1286 int flags, void *data,
1287 int (*fill_super)(struct super_block *, void *, int)); 1287 int (*fill_super)(struct super_block *, void *, int),
1288struct super_block *get_sb_nodev(struct file_system_type *fs_type, 1288 struct vfsmount *mnt);
1289extern int get_sb_nodev(struct file_system_type *fs_type,
1289 int flags, void *data, 1290 int flags, void *data,
1290 int (*fill_super)(struct super_block *, void *, int)); 1291 int (*fill_super)(struct super_block *, void *, int),
1292 struct vfsmount *mnt);
1291void generic_shutdown_super(struct super_block *sb); 1293void generic_shutdown_super(struct super_block *sb);
1292void kill_block_super(struct super_block *sb); 1294void kill_block_super(struct super_block *sb);
1293void kill_anon_super(struct super_block *sb); 1295void kill_anon_super(struct super_block *sb);
@@ -1298,8 +1300,10 @@ struct super_block *sget(struct file_system_type *type,
1298 int (*test)(struct super_block *,void *), 1300 int (*test)(struct super_block *,void *),
1299 int (*set)(struct super_block *,void *), 1301 int (*set)(struct super_block *,void *),
1300 void *data); 1302 void *data);
1301struct super_block *get_sb_pseudo(struct file_system_type *, char *, 1303extern int get_sb_pseudo(struct file_system_type *, char *,
1302 struct super_operations *ops, unsigned long); 1304 struct super_operations *ops, unsigned long,
1305 struct vfsmount *mnt);
1306extern int simple_set_mnt(struct vfsmount *mnt, struct super_block *sb);
1303int __put_super(struct super_block *sb); 1307int __put_super(struct super_block *sb);
1304int __put_super_and_need_restart(struct super_block *sb); 1308int __put_super_and_need_restart(struct super_block *sb);
1305void unnamed_dev_init(void); 1309void unnamed_dev_init(void);
@@ -1322,7 +1326,7 @@ extern struct vfsmount *copy_tree(struct vfsmount *, struct dentry *, int);
1322extern void mnt_set_mountpoint(struct vfsmount *, struct dentry *, 1326extern void mnt_set_mountpoint(struct vfsmount *, struct dentry *,
1323 struct vfsmount *); 1327 struct vfsmount *);
1324 1328
1325extern int vfs_statfs(struct super_block *, struct kstatfs *); 1329extern int vfs_statfs(struct dentry *, struct kstatfs *);
1326 1330
1327/* /sys/fs */ 1331/* /sys/fs */
1328extern struct subsystem fs_subsys; 1332extern struct subsystem fs_subsys;
@@ -1404,7 +1408,7 @@ extern void bd_forget(struct inode *inode);
1404extern void bdput(struct block_device *); 1408extern void bdput(struct block_device *);
1405extern struct block_device *open_by_devnum(dev_t, unsigned); 1409extern struct block_device *open_by_devnum(dev_t, unsigned);
1406extern const struct file_operations def_blk_fops; 1410extern const struct file_operations def_blk_fops;
1407extern struct address_space_operations def_blk_aops; 1411extern const struct address_space_operations def_blk_aops;
1408extern const struct file_operations def_chr_fops; 1412extern const struct file_operations def_chr_fops;
1409extern const struct file_operations bad_sock_fops; 1413extern const struct file_operations bad_sock_fops;
1410extern const struct file_operations def_fifo_fops; 1414extern const struct file_operations def_fifo_fops;
@@ -1746,7 +1750,7 @@ extern int dcache_dir_close(struct inode *, struct file *);
1746extern loff_t dcache_dir_lseek(struct file *, loff_t, int); 1750extern loff_t dcache_dir_lseek(struct file *, loff_t, int);
1747extern int dcache_readdir(struct file *, void *, filldir_t); 1751extern int dcache_readdir(struct file *, void *, filldir_t);
1748extern int simple_getattr(struct vfsmount *, struct dentry *, struct kstat *); 1752extern int simple_getattr(struct vfsmount *, struct dentry *, struct kstat *);
1749extern int simple_statfs(struct super_block *, struct kstatfs *); 1753extern int simple_statfs(struct dentry *, struct kstatfs *);
1750extern int simple_link(struct dentry *, struct inode *, struct dentry *); 1754extern int simple_link(struct dentry *, struct inode *, struct dentry *);
1751extern int simple_unlink(struct inode *, struct dentry *); 1755extern int simple_unlink(struct inode *, struct dentry *);
1752extern int simple_rmdir(struct inode *, struct dentry *); 1756extern int simple_rmdir(struct inode *, struct dentry *);
@@ -1766,13 +1770,14 @@ extern struct inode_operations simple_dir_inode_operations;
1766struct tree_descr { char *name; const struct file_operations *ops; int mode; }; 1770struct tree_descr { char *name; const struct file_operations *ops; int mode; };
1767struct dentry *d_alloc_name(struct dentry *, const char *); 1771struct dentry *d_alloc_name(struct dentry *, const char *);
1768extern int simple_fill_super(struct super_block *, int, struct tree_descr *); 1772extern int simple_fill_super(struct super_block *, int, struct tree_descr *);
1769extern int simple_pin_fs(char *name, struct vfsmount **mount, int *count); 1773extern int simple_pin_fs(struct file_system_type *, struct vfsmount **mount, int *count);
1770extern void simple_release_fs(struct vfsmount **mount, int *count); 1774extern void simple_release_fs(struct vfsmount **mount, int *count);
1771 1775
1772extern ssize_t simple_read_from_buffer(void __user *, size_t, loff_t *, const void *, size_t); 1776extern ssize_t simple_read_from_buffer(void __user *, size_t, loff_t *, const void *, size_t);
1773 1777
1774#ifdef CONFIG_MIGRATION 1778#ifdef CONFIG_MIGRATION
1775extern int buffer_migrate_page(struct page *, struct page *); 1779extern int buffer_migrate_page(struct address_space *,
1780 struct page *, struct page *);
1776#else 1781#else
1777#define buffer_migrate_page NULL 1782#define buffer_migrate_page NULL
1778#endif 1783#endif