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.h24
1 files changed, 22 insertions, 2 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 517bf4966bf5..3ae8e37bdfc8 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -220,6 +220,7 @@ extern int dir_notify_enable;
220 220
221struct iovec; 221struct iovec;
222struct nameidata; 222struct nameidata;
223struct kiocb;
223struct pipe_inode_info; 224struct pipe_inode_info;
224struct poll_table_struct; 225struct poll_table_struct;
225struct kstatfs; 226struct kstatfs;
@@ -240,7 +241,7 @@ typedef int (get_block_t)(struct inode *inode, sector_t iblock,
240typedef int (get_blocks_t)(struct inode *inode, sector_t iblock, 241typedef int (get_blocks_t)(struct inode *inode, sector_t iblock,
241 unsigned long max_blocks, 242 unsigned long max_blocks,
242 struct buffer_head *bh_result, int create); 243 struct buffer_head *bh_result, int create);
243typedef void (dio_iodone_t)(struct inode *inode, loff_t offset, 244typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset,
244 ssize_t bytes, void *private); 245 ssize_t bytes, void *private);
245 246
246/* 247/*
@@ -302,7 +303,6 @@ struct iattr {
302struct page; 303struct page;
303struct address_space; 304struct address_space;
304struct writeback_control; 305struct writeback_control;
305struct kiocb;
306 306
307struct address_space_operations { 307struct address_space_operations {
308 int (*writepage)(struct page *page, struct writeback_control *wbc); 308 int (*writepage)(struct page *page, struct writeback_control *wbc);
@@ -330,6 +330,8 @@ struct address_space_operations {
330 int (*releasepage) (struct page *, int); 330 int (*releasepage) (struct page *, int);
331 ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov, 331 ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov,
332 loff_t offset, unsigned long nr_segs); 332 loff_t offset, unsigned long nr_segs);
333 struct page* (*get_xip_page)(struct address_space *, sector_t,
334 int);
333}; 335};
334 336
335struct backing_dev_info; 337struct backing_dev_info;
@@ -885,6 +887,7 @@ struct block_device_operations {
885 int (*ioctl) (struct inode *, struct file *, unsigned, unsigned long); 887 int (*ioctl) (struct inode *, struct file *, unsigned, unsigned long);
886 long (*unlocked_ioctl) (struct file *, unsigned, unsigned long); 888 long (*unlocked_ioctl) (struct file *, unsigned, unsigned long);
887 long (*compat_ioctl) (struct file *, unsigned, unsigned long); 889 long (*compat_ioctl) (struct file *, unsigned, unsigned long);
890 int (*direct_access) (struct block_device *, sector_t, unsigned long *);
888 int (*media_changed) (struct gendisk *); 891 int (*media_changed) (struct gendisk *);
889 int (*revalidate_disk) (struct gendisk *); 892 int (*revalidate_disk) (struct gendisk *);
890 struct module *owner; 893 struct module *owner;
@@ -1496,6 +1499,23 @@ extern loff_t remote_llseek(struct file *file, loff_t offset, int origin);
1496extern int generic_file_open(struct inode * inode, struct file * filp); 1499extern int generic_file_open(struct inode * inode, struct file * filp);
1497extern int nonseekable_open(struct inode * inode, struct file * filp); 1500extern int nonseekable_open(struct inode * inode, struct file * filp);
1498 1501
1502#ifdef CONFIG_FS_XIP
1503extern ssize_t xip_file_read(struct file *filp, char __user *buf, size_t len,
1504 loff_t *ppos);
1505extern ssize_t xip_file_sendfile(struct file *in_file, loff_t *ppos,
1506 size_t count, read_actor_t actor,
1507 void *target);
1508extern int xip_file_mmap(struct file * file, struct vm_area_struct * vma);
1509extern ssize_t xip_file_write(struct file *filp, const char __user *buf,
1510 size_t len, loff_t *ppos);
1511extern int xip_truncate_page(struct address_space *mapping, loff_t from);
1512#else
1513static inline int xip_truncate_page(struct address_space *mapping, loff_t from)
1514{
1515 return 0;
1516}
1517#endif
1518
1499static inline void do_generic_file_read(struct file * filp, loff_t *ppos, 1519static inline void do_generic_file_read(struct file * filp, loff_t *ppos,
1500 read_descriptor_t * desc, 1520 read_descriptor_t * desc,
1501 read_actor_t actor) 1521 read_actor_t actor)