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.h66
1 files changed, 17 insertions, 49 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 488efec09d14..9e221016a6a9 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -210,6 +210,7 @@ struct inodes_stat_t {
210#define MS_KERNMOUNT (1<<22) /* this is a kern_mount call */ 210#define MS_KERNMOUNT (1<<22) /* this is a kern_mount call */
211#define MS_I_VERSION (1<<23) /* Update inode I_version field */ 211#define MS_I_VERSION (1<<23) /* Update inode I_version field */
212#define MS_STRICTATIME (1<<24) /* Always perform atime updates */ 212#define MS_STRICTATIME (1<<24) /* Always perform atime updates */
213#define MS_BORN (1<<29)
213#define MS_ACTIVE (1<<30) 214#define MS_ACTIVE (1<<30)
214#define MS_NOUSER (1<<31) 215#define MS_NOUSER (1<<31)
215 216
@@ -1564,8 +1565,8 @@ struct super_operations {
1564 1565
1565 void (*dirty_inode) (struct inode *); 1566 void (*dirty_inode) (struct inode *);
1566 int (*write_inode) (struct inode *, struct writeback_control *wbc); 1567 int (*write_inode) (struct inode *, struct writeback_control *wbc);
1567 void (*drop_inode) (struct inode *); 1568 int (*drop_inode) (struct inode *);
1568 void (*delete_inode) (struct inode *); 1569 void (*evict_inode) (struct inode *);
1569 void (*put_super) (struct super_block *); 1570 void (*put_super) (struct super_block *);
1570 void (*write_super) (struct super_block *); 1571 void (*write_super) (struct super_block *);
1571 int (*sync_fs)(struct super_block *sb, int wait); 1572 int (*sync_fs)(struct super_block *sb, int wait);
@@ -1573,7 +1574,6 @@ struct super_operations {
1573 int (*unfreeze_fs) (struct super_block *); 1574 int (*unfreeze_fs) (struct super_block *);
1574 int (*statfs) (struct dentry *, struct kstatfs *); 1575 int (*statfs) (struct dentry *, struct kstatfs *);
1575 int (*remount_fs) (struct super_block *, int *, char *); 1576 int (*remount_fs) (struct super_block *, int *, char *);
1576 void (*clear_inode) (struct inode *);
1577 void (*umount_begin) (struct super_block *); 1577 void (*umount_begin) (struct super_block *);
1578 1578
1579 int (*show_options)(struct seq_file *, struct vfsmount *); 1579 int (*show_options)(struct seq_file *, struct vfsmount *);
@@ -1618,8 +1618,8 @@ struct super_operations {
1618 * I_FREEING Set when inode is about to be freed but still has dirty 1618 * I_FREEING Set when inode is about to be freed but still has dirty
1619 * pages or buffers attached or the inode itself is still 1619 * pages or buffers attached or the inode itself is still
1620 * dirty. 1620 * dirty.
1621 * I_CLEAR Set by clear_inode(). In this state the inode is clean 1621 * I_CLEAR Added by end_writeback(). In this state the inode is clean
1622 * and can be destroyed. 1622 * and can be destroyed. Inode keeps I_FREEING.
1623 * 1623 *
1624 * Inodes that are I_WILL_FREE, I_FREEING or I_CLEAR are 1624 * Inodes that are I_WILL_FREE, I_FREEING or I_CLEAR are
1625 * prohibited for many purposes. iget() must wait for 1625 * prohibited for many purposes. iget() must wait for
@@ -1816,7 +1816,8 @@ extern struct vfsmount *collect_mounts(struct path *);
1816extern void drop_collected_mounts(struct vfsmount *); 1816extern void drop_collected_mounts(struct vfsmount *);
1817extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *, 1817extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *,
1818 struct vfsmount *); 1818 struct vfsmount *);
1819extern int vfs_statfs(struct dentry *, struct kstatfs *); 1819extern int vfs_statfs(struct path *, struct kstatfs *);
1820extern int statfs_by_dentry(struct dentry *, struct kstatfs *);
1820extern int freeze_super(struct super_block *super); 1821extern int freeze_super(struct super_block *super);
1821extern int thaw_super(struct super_block *super); 1822extern int thaw_super(struct super_block *super);
1822 1823
@@ -2166,9 +2167,8 @@ extern void iput(struct inode *);
2166extern struct inode * igrab(struct inode *); 2167extern struct inode * igrab(struct inode *);
2167extern ino_t iunique(struct super_block *, ino_t); 2168extern ino_t iunique(struct super_block *, ino_t);
2168extern int inode_needs_sync(struct inode *inode); 2169extern int inode_needs_sync(struct inode *inode);
2169extern void generic_delete_inode(struct inode *inode); 2170extern int generic_delete_inode(struct inode *inode);
2170extern void generic_drop_inode(struct inode *inode); 2171extern int generic_drop_inode(struct inode *inode);
2171extern int generic_detach_inode(struct inode *inode);
2172 2172
2173extern struct inode *ilookup5_nowait(struct super_block *sb, 2173extern struct inode *ilookup5_nowait(struct super_block *sb,
2174 unsigned long hashval, int (*test)(struct inode *, void *), 2174 unsigned long hashval, int (*test)(struct inode *, void *),
@@ -2185,7 +2185,7 @@ extern void unlock_new_inode(struct inode *);
2185 2185
2186extern void __iget(struct inode * inode); 2186extern void __iget(struct inode * inode);
2187extern void iget_failed(struct inode *); 2187extern void iget_failed(struct inode *);
2188extern void clear_inode(struct inode *); 2188extern void end_writeback(struct inode *);
2189extern void destroy_inode(struct inode *); 2189extern void destroy_inode(struct inode *);
2190extern void __destroy_inode(struct inode *); 2190extern void __destroy_inode(struct inode *);
2191extern struct inode *new_inode(struct super_block *); 2191extern struct inode *new_inode(struct super_block *);
@@ -2271,16 +2271,6 @@ static inline int xip_truncate_page(struct address_space *mapping, loff_t from)
2271struct bio; 2271struct bio;
2272typedef void (dio_submit_t)(int rw, struct bio *bio, struct inode *inode, 2272typedef void (dio_submit_t)(int rw, struct bio *bio, struct inode *inode,
2273 loff_t file_offset); 2273 loff_t file_offset);
2274void dio_end_io(struct bio *bio, int error);
2275
2276ssize_t __blockdev_direct_IO_newtrunc(int rw, struct kiocb *iocb, struct inode *inode,
2277 struct block_device *bdev, const struct iovec *iov, loff_t offset,
2278 unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io,
2279 dio_submit_t submit_io, int lock_type);
2280ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
2281 struct block_device *bdev, const struct iovec *iov, loff_t offset,
2282 unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io,
2283 dio_submit_t submit_io, int lock_type);
2284 2274
2285enum { 2275enum {
2286 /* need locking between buffered and direct access */ 2276 /* need locking between buffered and direct access */
@@ -2290,24 +2280,13 @@ enum {
2290 DIO_SKIP_HOLES = 0x02, 2280 DIO_SKIP_HOLES = 0x02,
2291}; 2281};
2292 2282
2293static inline ssize_t blockdev_direct_IO_newtrunc(int rw, struct kiocb *iocb, 2283void dio_end_io(struct bio *bio, int error);
2294 struct inode *inode, struct block_device *bdev, const struct iovec *iov, 2284
2295 loff_t offset, unsigned long nr_segs, get_block_t get_block, 2285ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
2296 dio_iodone_t end_io) 2286 struct block_device *bdev, const struct iovec *iov, loff_t offset,
2297{ 2287 unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io,
2298 return __blockdev_direct_IO_newtrunc(rw, iocb, inode, bdev, iov, offset, 2288 dio_submit_t submit_io, int flags);
2299 nr_segs, get_block, end_io, NULL,
2300 DIO_LOCKING | DIO_SKIP_HOLES);
2301}
2302 2289
2303static inline ssize_t blockdev_direct_IO_no_locking_newtrunc(int rw, struct kiocb *iocb,
2304 struct inode *inode, struct block_device *bdev, const struct iovec *iov,
2305 loff_t offset, unsigned long nr_segs, get_block_t get_block,
2306 dio_iodone_t end_io)
2307{
2308 return __blockdev_direct_IO_newtrunc(rw, iocb, inode, bdev, iov, offset,
2309 nr_segs, get_block, end_io, NULL, 0);
2310}
2311static inline ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb, 2290static inline ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb,
2312 struct inode *inode, struct block_device *bdev, const struct iovec *iov, 2291 struct inode *inode, struct block_device *bdev, const struct iovec *iov,
2313 loff_t offset, unsigned long nr_segs, get_block_t get_block, 2292 loff_t offset, unsigned long nr_segs, get_block_t get_block,
@@ -2317,15 +2296,6 @@ static inline ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb,
2317 nr_segs, get_block, end_io, NULL, 2296 nr_segs, get_block, end_io, NULL,
2318 DIO_LOCKING | DIO_SKIP_HOLES); 2297 DIO_LOCKING | DIO_SKIP_HOLES);
2319} 2298}
2320
2321static inline ssize_t blockdev_direct_IO_no_locking(int rw, struct kiocb *iocb,
2322 struct inode *inode, struct block_device *bdev, const struct iovec *iov,
2323 loff_t offset, unsigned long nr_segs, get_block_t get_block,
2324 dio_iodone_t end_io)
2325{
2326 return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset,
2327 nr_segs, get_block, end_io, NULL, 0);
2328}
2329#endif 2299#endif
2330 2300
2331extern const struct file_operations generic_ro_fops; 2301extern const struct file_operations generic_ro_fops;
@@ -2387,7 +2357,6 @@ extern int simple_link(struct dentry *, struct inode *, struct dentry *);
2387extern int simple_unlink(struct inode *, struct dentry *); 2357extern int simple_unlink(struct inode *, struct dentry *);
2388extern int simple_rmdir(struct inode *, struct dentry *); 2358extern int simple_rmdir(struct inode *, struct dentry *);
2389extern int simple_rename(struct inode *, struct dentry *, struct inode *, struct dentry *); 2359extern int simple_rename(struct inode *, struct dentry *, struct inode *, struct dentry *);
2390extern int simple_setsize(struct inode *, loff_t);
2391extern int noop_fsync(struct file *, int); 2360extern int noop_fsync(struct file *, int);
2392extern int simple_empty(struct dentry *); 2361extern int simple_empty(struct dentry *);
2393extern int simple_readpage(struct file *file, struct page *page); 2362extern int simple_readpage(struct file *file, struct page *page);
@@ -2424,8 +2393,7 @@ extern int buffer_migrate_page(struct address_space *,
2424 2393
2425extern int inode_change_ok(const struct inode *, struct iattr *); 2394extern int inode_change_ok(const struct inode *, struct iattr *);
2426extern int inode_newsize_ok(const struct inode *, loff_t offset); 2395extern int inode_newsize_ok(const struct inode *, loff_t offset);
2427extern int __must_check inode_setattr(struct inode *, const struct iattr *); 2396extern void setattr_copy(struct inode *inode, const struct iattr *attr);
2428extern void generic_setattr(struct inode *inode, const struct iattr *attr);
2429 2397
2430extern void file_update_time(struct file *file); 2398extern void file_update_time(struct file *file);
2431 2399