diff options
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 37 |
1 files changed, 25 insertions, 12 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 408fe89498f4..162c6e57307a 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -757,6 +757,13 @@ extern void send_sigio(struct fown_struct *fown, int fd, int band); | |||
757 | extern int fcntl_setlease(unsigned int fd, struct file *filp, long arg); | 757 | extern int fcntl_setlease(unsigned int fd, struct file *filp, long arg); |
758 | extern int fcntl_getlease(struct file *filp); | 758 | extern int fcntl_getlease(struct file *filp); |
759 | 759 | ||
760 | /* fs/sync.c */ | ||
761 | #define SYNC_FILE_RANGE_WAIT_BEFORE 1 | ||
762 | #define SYNC_FILE_RANGE_WRITE 2 | ||
763 | #define SYNC_FILE_RANGE_WAIT_AFTER 4 | ||
764 | extern int do_sync_file_range(struct file *file, loff_t offset, loff_t endbyte, | ||
765 | unsigned int flags); | ||
766 | |||
760 | /* fs/locks.c */ | 767 | /* fs/locks.c */ |
761 | extern void locks_init_lock(struct file_lock *); | 768 | extern void locks_init_lock(struct file_lock *); |
762 | extern void locks_copy_lock(struct file_lock *, struct file_lock *); | 769 | extern void locks_copy_lock(struct file_lock *, struct file_lock *); |
@@ -857,7 +864,7 @@ struct super_block { | |||
857 | */ | 864 | */ |
858 | struct mutex s_vfs_rename_mutex; /* Kludge */ | 865 | struct mutex s_vfs_rename_mutex; /* Kludge */ |
859 | 866 | ||
860 | /* Granuality of c/m/atime in ns. | 867 | /* Granularity of c/m/atime in ns. |
861 | Cannot be worse than a second */ | 868 | Cannot be worse than a second */ |
862 | u32 s_time_gran; | 869 | u32 s_time_gran; |
863 | }; | 870 | }; |
@@ -1032,6 +1039,8 @@ struct file_operations { | |||
1032 | int (*check_flags)(int); | 1039 | int (*check_flags)(int); |
1033 | int (*dir_notify)(struct file *filp, unsigned long arg); | 1040 | int (*dir_notify)(struct file *filp, unsigned long arg); |
1034 | int (*flock) (struct file *, int, struct file_lock *); | 1041 | int (*flock) (struct file *, int, struct file_lock *); |
1042 | ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, size_t, unsigned int); | ||
1043 | ssize_t (*splice_read)(struct file *, struct pipe_inode_info *, size_t, unsigned int); | ||
1035 | }; | 1044 | }; |
1036 | 1045 | ||
1037 | struct inode_operations { | 1046 | struct inode_operations { |
@@ -1411,6 +1420,7 @@ extern void bd_release_from_disk(struct block_device *, struct gendisk *); | |||
1411 | #endif | 1420 | #endif |
1412 | 1421 | ||
1413 | /* fs/char_dev.c */ | 1422 | /* fs/char_dev.c */ |
1423 | #define CHRDEV_MAJOR_HASH_SIZE 255 | ||
1414 | extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *); | 1424 | extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *); |
1415 | extern int register_chrdev_region(dev_t, unsigned, const char *); | 1425 | extern int register_chrdev_region(dev_t, unsigned, const char *); |
1416 | extern int register_chrdev(unsigned int, const char *, | 1426 | extern int register_chrdev(unsigned int, const char *, |
@@ -1418,25 +1428,17 @@ extern int register_chrdev(unsigned int, const char *, | |||
1418 | extern int unregister_chrdev(unsigned int, const char *); | 1428 | extern int unregister_chrdev(unsigned int, const char *); |
1419 | extern void unregister_chrdev_region(dev_t, unsigned); | 1429 | extern void unregister_chrdev_region(dev_t, unsigned); |
1420 | extern int chrdev_open(struct inode *, struct file *); | 1430 | extern int chrdev_open(struct inode *, struct file *); |
1421 | extern int get_chrdev_list(char *); | 1431 | extern void chrdev_show(struct seq_file *,off_t); |
1422 | extern void *acquire_chrdev_list(void); | ||
1423 | extern int count_chrdev_list(void); | ||
1424 | extern void *get_next_chrdev(void *); | ||
1425 | extern int get_chrdev_info(void *, int *, char **); | ||
1426 | extern void release_chrdev_list(void *); | ||
1427 | 1432 | ||
1428 | /* fs/block_dev.c */ | 1433 | /* fs/block_dev.c */ |
1434 | #define BLKDEV_MAJOR_HASH_SIZE 255 | ||
1429 | #define BDEVNAME_SIZE 32 /* Largest string for a blockdev identifier */ | 1435 | #define BDEVNAME_SIZE 32 /* Largest string for a blockdev identifier */ |
1430 | extern const char *__bdevname(dev_t, char *buffer); | 1436 | extern const char *__bdevname(dev_t, char *buffer); |
1431 | extern const char *bdevname(struct block_device *bdev, char *buffer); | 1437 | extern const char *bdevname(struct block_device *bdev, char *buffer); |
1432 | extern struct block_device *lookup_bdev(const char *); | 1438 | extern struct block_device *lookup_bdev(const char *); |
1433 | extern struct block_device *open_bdev_excl(const char *, int, void *); | 1439 | extern struct block_device *open_bdev_excl(const char *, int, void *); |
1434 | extern void close_bdev_excl(struct block_device *); | 1440 | extern void close_bdev_excl(struct block_device *); |
1435 | extern void *acquire_blkdev_list(void); | 1441 | extern void blkdev_show(struct seq_file *,off_t); |
1436 | extern int count_blkdev_list(void); | ||
1437 | extern void *get_next_blkdev(void *); | ||
1438 | extern int get_blkdev_info(void *, int *, char **); | ||
1439 | extern void release_blkdev_list(void *); | ||
1440 | 1442 | ||
1441 | extern void init_special_inode(struct inode *, umode_t, dev_t); | 1443 | extern void init_special_inode(struct inode *, umode_t, dev_t); |
1442 | 1444 | ||
@@ -1609,6 +1611,17 @@ extern ssize_t generic_file_sendfile(struct file *, loff_t *, size_t, read_actor | |||
1609 | extern void do_generic_mapping_read(struct address_space *mapping, | 1611 | extern void do_generic_mapping_read(struct address_space *mapping, |
1610 | struct file_ra_state *, struct file *, | 1612 | struct file_ra_state *, struct file *, |
1611 | loff_t *, read_descriptor_t *, read_actor_t); | 1613 | loff_t *, read_descriptor_t *, read_actor_t); |
1614 | |||
1615 | /* fs/splice.c */ | ||
1616 | extern ssize_t generic_file_splice_read(struct file *, | ||
1617 | struct pipe_inode_info *, size_t, unsigned int); | ||
1618 | extern ssize_t generic_file_splice_write(struct pipe_inode_info *, | ||
1619 | struct file *, size_t, unsigned int); | ||
1620 | extern ssize_t generic_splice_sendpage(struct pipe_inode_info *pipe, | ||
1621 | struct file *out, size_t len, unsigned int flags); | ||
1622 | extern long do_splice_direct(struct file *in, struct file *out, | ||
1623 | size_t len, unsigned int flags); | ||
1624 | |||
1612 | extern void | 1625 | extern void |
1613 | file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping); | 1626 | file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping); |
1614 | extern ssize_t generic_file_readv(struct file *filp, const struct iovec *iov, | 1627 | extern ssize_t generic_file_readv(struct file *filp, const struct iovec *iov, |