diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/blkdev.h | 8 | ||||
-rw-r--r-- | include/linux/fs.h | 8 | ||||
-rw-r--r-- | include/linux/jbd2.h | 2 | ||||
-rw-r--r-- | include/linux/percpu_counter.h | 10 | ||||
-rw-r--r-- | include/linux/writeback.h | 2 |
5 files changed, 29 insertions, 1 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 646b462d04df..5027a599077d 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -891,6 +891,14 @@ static inline int sb_issue_discard(struct super_block *sb, sector_t block, | |||
891 | nr_blocks << (sb->s_blocksize_bits - 9), | 891 | nr_blocks << (sb->s_blocksize_bits - 9), |
892 | gfp_mask, flags); | 892 | gfp_mask, flags); |
893 | } | 893 | } |
894 | static inline int sb_issue_zeroout(struct super_block *sb, sector_t block, | ||
895 | sector_t nr_blocks, gfp_t gfp_mask) | ||
896 | { | ||
897 | return blkdev_issue_zeroout(sb->s_bdev, | ||
898 | block << (sb->s_blocksize_bits - 9), | ||
899 | nr_blocks << (sb->s_blocksize_bits - 9), | ||
900 | gfp_mask); | ||
901 | } | ||
894 | 902 | ||
895 | extern int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm); | 903 | extern int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm); |
896 | 904 | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index b2a6009cba10..6ed7ace74b7c 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -32,6 +32,12 @@ | |||
32 | #define SEEK_END 2 /* seek relative to end of file */ | 32 | #define SEEK_END 2 /* seek relative to end of file */ |
33 | #define SEEK_MAX SEEK_END | 33 | #define SEEK_MAX SEEK_END |
34 | 34 | ||
35 | struct fstrim_range { | ||
36 | uint64_t start; | ||
37 | uint64_t len; | ||
38 | uint64_t minlen; | ||
39 | }; | ||
40 | |||
35 | /* And dynamically-tunable limits and defaults: */ | 41 | /* And dynamically-tunable limits and defaults: */ |
36 | struct files_stat_struct { | 42 | struct files_stat_struct { |
37 | unsigned long nr_files; /* read only */ | 43 | unsigned long nr_files; /* read only */ |
@@ -317,6 +323,7 @@ struct inodes_stat_t { | |||
317 | #define FIGETBSZ _IO(0x00,2) /* get the block size used for bmap */ | 323 | #define FIGETBSZ _IO(0x00,2) /* get the block size used for bmap */ |
318 | #define FIFREEZE _IOWR('X', 119, int) /* Freeze */ | 324 | #define FIFREEZE _IOWR('X', 119, int) /* Freeze */ |
319 | #define FITHAW _IOWR('X', 120, int) /* Thaw */ | 325 | #define FITHAW _IOWR('X', 120, int) /* Thaw */ |
326 | #define FITRIM _IOWR('X', 121, struct fstrim_range) /* Trim */ | ||
320 | 327 | ||
321 | #define FS_IOC_GETFLAGS _IOR('f', 1, long) | 328 | #define FS_IOC_GETFLAGS _IOR('f', 1, long) |
322 | #define FS_IOC_SETFLAGS _IOW('f', 2, long) | 329 | #define FS_IOC_SETFLAGS _IOW('f', 2, long) |
@@ -1604,6 +1611,7 @@ struct super_operations { | |||
1604 | ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); | 1611 | ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); |
1605 | #endif | 1612 | #endif |
1606 | int (*bdev_try_to_free_page)(struct super_block*, struct page*, gfp_t); | 1613 | int (*bdev_try_to_free_page)(struct super_block*, struct page*, gfp_t); |
1614 | int (*trim_fs) (struct super_block *, struct fstrim_range *); | ||
1607 | }; | 1615 | }; |
1608 | 1616 | ||
1609 | /* | 1617 | /* |
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 0b52924a0cb6..2ae86aa21fce 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -395,7 +395,7 @@ struct jbd2_inode { | |||
395 | struct inode *i_vfs_inode; | 395 | struct inode *i_vfs_inode; |
396 | 396 | ||
397 | /* Flags of inode [j_list_lock] */ | 397 | /* Flags of inode [j_list_lock] */ |
398 | unsigned int i_flags; | 398 | unsigned long i_flags; |
399 | }; | 399 | }; |
400 | 400 | ||
401 | struct jbd2_revoke_table_s; | 401 | struct jbd2_revoke_table_s; |
diff --git a/include/linux/percpu_counter.h b/include/linux/percpu_counter.h index 8a7d510ffa9c..46f6ba56fa91 100644 --- a/include/linux/percpu_counter.h +++ b/include/linux/percpu_counter.h | |||
@@ -78,6 +78,11 @@ static inline s64 percpu_counter_read_positive(struct percpu_counter *fbc) | |||
78 | return 1; | 78 | return 1; |
79 | } | 79 | } |
80 | 80 | ||
81 | static inline int percpu_counter_initialized(struct percpu_counter *fbc) | ||
82 | { | ||
83 | return (fbc->counters != NULL); | ||
84 | } | ||
85 | |||
81 | #else | 86 | #else |
82 | 87 | ||
83 | struct percpu_counter { | 88 | struct percpu_counter { |
@@ -143,6 +148,11 @@ static inline s64 percpu_counter_sum(struct percpu_counter *fbc) | |||
143 | return percpu_counter_read(fbc); | 148 | return percpu_counter_read(fbc); |
144 | } | 149 | } |
145 | 150 | ||
151 | static inline int percpu_counter_initialized(struct percpu_counter *fbc) | ||
152 | { | ||
153 | return 1; | ||
154 | } | ||
155 | |||
146 | #endif /* CONFIG_SMP */ | 156 | #endif /* CONFIG_SMP */ |
147 | 157 | ||
148 | static inline void percpu_counter_inc(struct percpu_counter *fbc) | 158 | static inline void percpu_counter_inc(struct percpu_counter *fbc) |
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index d5c7aaadda59..09eec350054d 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -141,6 +141,8 @@ typedef int (*writepage_t)(struct page *page, struct writeback_control *wbc, | |||
141 | 141 | ||
142 | int generic_writepages(struct address_space *mapping, | 142 | int generic_writepages(struct address_space *mapping, |
143 | struct writeback_control *wbc); | 143 | struct writeback_control *wbc); |
144 | void tag_pages_for_writeback(struct address_space *mapping, | ||
145 | pgoff_t start, pgoff_t end); | ||
144 | int write_cache_pages(struct address_space *mapping, | 146 | int write_cache_pages(struct address_space *mapping, |
145 | struct writeback_control *wbc, writepage_t writepage, | 147 | struct writeback_control *wbc, writepage_t writepage, |
146 | void *data); | 148 | void *data); |