diff options
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 39 |
1 files changed, 27 insertions, 12 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 4658777b41cc..240eb1d4f876 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -92,6 +92,9 @@ struct inodes_stat_t { | |||
92 | /* Expect random access pattern */ | 92 | /* Expect random access pattern */ |
93 | #define FMODE_RANDOM ((__force fmode_t)0x1000) | 93 | #define FMODE_RANDOM ((__force fmode_t)0x1000) |
94 | 94 | ||
95 | /* File is huge (eg. /dev/kmem): treat loff_t as unsigned */ | ||
96 | #define FMODE_UNSIGNED_OFFSET ((__force fmode_t)0x2000) | ||
97 | |||
95 | /* File was opened by fanotify and shouldn't generate fanotify events */ | 98 | /* File was opened by fanotify and shouldn't generate fanotify events */ |
96 | #define FMODE_NONOTIFY ((__force fmode_t)0x1000000) | 99 | #define FMODE_NONOTIFY ((__force fmode_t)0x1000000) |
97 | 100 | ||
@@ -722,7 +725,8 @@ struct posix_acl; | |||
722 | 725 | ||
723 | struct inode { | 726 | struct inode { |
724 | struct hlist_node i_hash; | 727 | struct hlist_node i_hash; |
725 | struct list_head i_list; /* backing dev IO list */ | 728 | struct list_head i_wb_list; /* backing dev IO list */ |
729 | struct list_head i_lru; /* inode LRU list */ | ||
726 | struct list_head i_sb_list; | 730 | struct list_head i_sb_list; |
727 | struct list_head i_dentry; | 731 | struct list_head i_dentry; |
728 | unsigned long i_ino; | 732 | unsigned long i_ino; |
@@ -789,6 +793,11 @@ struct inode { | |||
789 | void *i_private; /* fs or device private pointer */ | 793 | void *i_private; /* fs or device private pointer */ |
790 | }; | 794 | }; |
791 | 795 | ||
796 | static inline int inode_unhashed(struct inode *inode) | ||
797 | { | ||
798 | return hlist_unhashed(&inode->i_hash); | ||
799 | } | ||
800 | |||
792 | /* | 801 | /* |
793 | * inode->i_mutex nesting subclasses for the lock validator: | 802 | * inode->i_mutex nesting subclasses for the lock validator: |
794 | * | 803 | * |
@@ -1639,16 +1648,17 @@ struct super_operations { | |||
1639 | * | 1648 | * |
1640 | * Q: What is the difference between I_WILL_FREE and I_FREEING? | 1649 | * Q: What is the difference between I_WILL_FREE and I_FREEING? |
1641 | */ | 1650 | */ |
1642 | #define I_DIRTY_SYNC 1 | 1651 | #define I_DIRTY_SYNC (1 << 0) |
1643 | #define I_DIRTY_DATASYNC 2 | 1652 | #define I_DIRTY_DATASYNC (1 << 1) |
1644 | #define I_DIRTY_PAGES 4 | 1653 | #define I_DIRTY_PAGES (1 << 2) |
1645 | #define __I_NEW 3 | 1654 | #define __I_NEW 3 |
1646 | #define I_NEW (1 << __I_NEW) | 1655 | #define I_NEW (1 << __I_NEW) |
1647 | #define I_WILL_FREE 16 | 1656 | #define I_WILL_FREE (1 << 4) |
1648 | #define I_FREEING 32 | 1657 | #define I_FREEING (1 << 5) |
1649 | #define I_CLEAR 64 | 1658 | #define I_CLEAR (1 << 6) |
1650 | #define __I_SYNC 7 | 1659 | #define __I_SYNC 7 |
1651 | #define I_SYNC (1 << __I_SYNC) | 1660 | #define I_SYNC (1 << __I_SYNC) |
1661 | #define I_REFERENCED (1 << 8) | ||
1652 | 1662 | ||
1653 | #define I_DIRTY (I_DIRTY_SYNC | I_DIRTY_DATASYNC | I_DIRTY_PAGES) | 1663 | #define I_DIRTY (I_DIRTY_SYNC | I_DIRTY_DATASYNC | I_DIRTY_PAGES) |
1654 | 1664 | ||
@@ -1740,6 +1750,7 @@ static inline void file_accessed(struct file *file) | |||
1740 | } | 1750 | } |
1741 | 1751 | ||
1742 | int sync_inode(struct inode *inode, struct writeback_control *wbc); | 1752 | int sync_inode(struct inode *inode, struct writeback_control *wbc); |
1753 | int sync_inode_metadata(struct inode *inode, int wait); | ||
1743 | 1754 | ||
1744 | struct file_system_type { | 1755 | struct file_system_type { |
1745 | const char *name; | 1756 | const char *name; |
@@ -2084,7 +2095,6 @@ extern int check_disk_change(struct block_device *); | |||
2084 | extern int __invalidate_device(struct block_device *); | 2095 | extern int __invalidate_device(struct block_device *); |
2085 | extern int invalidate_partition(struct gendisk *, int); | 2096 | extern int invalidate_partition(struct gendisk *, int); |
2086 | #endif | 2097 | #endif |
2087 | extern int invalidate_inodes(struct super_block *); | ||
2088 | unsigned long invalidate_mapping_pages(struct address_space *mapping, | 2098 | unsigned long invalidate_mapping_pages(struct address_space *mapping, |
2089 | pgoff_t start, pgoff_t end); | 2099 | pgoff_t start, pgoff_t end); |
2090 | 2100 | ||
@@ -2168,7 +2178,7 @@ extern loff_t vfs_llseek(struct file *file, loff_t offset, int origin); | |||
2168 | 2178 | ||
2169 | extern int inode_init_always(struct super_block *, struct inode *); | 2179 | extern int inode_init_always(struct super_block *, struct inode *); |
2170 | extern void inode_init_once(struct inode *); | 2180 | extern void inode_init_once(struct inode *); |
2171 | extern void inode_add_to_lists(struct super_block *, struct inode *); | 2181 | extern void ihold(struct inode * inode); |
2172 | extern void iput(struct inode *); | 2182 | extern void iput(struct inode *); |
2173 | extern struct inode * igrab(struct inode *); | 2183 | extern struct inode * igrab(struct inode *); |
2174 | extern ino_t iunique(struct super_block *, ino_t); | 2184 | extern ino_t iunique(struct super_block *, ino_t); |
@@ -2188,11 +2198,11 @@ extern struct inode * iget_locked(struct super_block *, unsigned long); | |||
2188 | extern int insert_inode_locked4(struct inode *, unsigned long, int (*test)(struct inode *, void *), void *); | 2198 | extern int insert_inode_locked4(struct inode *, unsigned long, int (*test)(struct inode *, void *), void *); |
2189 | extern int insert_inode_locked(struct inode *); | 2199 | extern int insert_inode_locked(struct inode *); |
2190 | extern void unlock_new_inode(struct inode *); | 2200 | extern void unlock_new_inode(struct inode *); |
2201 | extern unsigned int get_next_ino(void); | ||
2191 | 2202 | ||
2192 | extern void __iget(struct inode * inode); | 2203 | extern void __iget(struct inode * inode); |
2193 | extern void iget_failed(struct inode *); | 2204 | extern void iget_failed(struct inode *); |
2194 | extern void end_writeback(struct inode *); | 2205 | extern void end_writeback(struct inode *); |
2195 | extern void destroy_inode(struct inode *); | ||
2196 | extern void __destroy_inode(struct inode *); | 2206 | extern void __destroy_inode(struct inode *); |
2197 | extern struct inode *new_inode(struct super_block *); | 2207 | extern struct inode *new_inode(struct super_block *); |
2198 | extern int should_remove_suid(struct dentry *); | 2208 | extern int should_remove_suid(struct dentry *); |
@@ -2200,9 +2210,11 @@ extern int file_remove_suid(struct file *); | |||
2200 | 2210 | ||
2201 | extern void __insert_inode_hash(struct inode *, unsigned long hashval); | 2211 | extern void __insert_inode_hash(struct inode *, unsigned long hashval); |
2202 | extern void remove_inode_hash(struct inode *); | 2212 | extern void remove_inode_hash(struct inode *); |
2203 | static inline void insert_inode_hash(struct inode *inode) { | 2213 | static inline void insert_inode_hash(struct inode *inode) |
2214 | { | ||
2204 | __insert_inode_hash(inode, inode->i_ino); | 2215 | __insert_inode_hash(inode, inode->i_ino); |
2205 | } | 2216 | } |
2217 | extern void inode_sb_list_add(struct inode *inode); | ||
2206 | 2218 | ||
2207 | #ifdef CONFIG_BLOCK | 2219 | #ifdef CONFIG_BLOCK |
2208 | extern void submit_bio(int, struct bio *); | 2220 | extern void submit_bio(int, struct bio *); |
@@ -2485,7 +2497,10 @@ ssize_t simple_attr_write(struct file *file, const char __user *buf, | |||
2485 | struct ctl_table; | 2497 | struct ctl_table; |
2486 | int proc_nr_files(struct ctl_table *table, int write, | 2498 | int proc_nr_files(struct ctl_table *table, int write, |
2487 | void __user *buffer, size_t *lenp, loff_t *ppos); | 2499 | void __user *buffer, size_t *lenp, loff_t *ppos); |
2488 | 2500 | int proc_nr_dentry(struct ctl_table *table, int write, | |
2501 | void __user *buffer, size_t *lenp, loff_t *ppos); | ||
2502 | int proc_nr_inodes(struct ctl_table *table, int write, | ||
2503 | void __user *buffer, size_t *lenp, loff_t *ppos); | ||
2489 | int __init get_filesystem_list(char *buf); | 2504 | int __init get_filesystem_list(char *buf); |
2490 | 2505 | ||
2491 | #define ACC_MODE(x) ("\004\002\006\006"[(x)&O_ACCMODE]) | 2506 | #define ACC_MODE(x) ("\004\002\006\006"[(x)&O_ACCMODE]) |