diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-28 00:54:31 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-28 00:54:31 -0400 |
commit | 81280572ca6f54009edfa4deee563e8678784218 (patch) | |
tree | 4fac10bcb71261823d261e5f8551fdb16ab653ba /include/linux | |
parent | b83db1deb29eb4eea9bf5992431d26978e039ce6 (diff) | |
parent | a107e5a3a473a2ea62bd5af24e11b84adf1486ff (diff) |
Merge branch 'upstream-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
* 'upstream-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (50 commits)
ext4,jbd2: convert tracepoints to use major/minor numbers
ext4: optimize orphan_list handling for ext4_setattr
ext4: fix unbalanced mutex unlock in error path of ext4_li_request_new
ext4: fix compile error in ext4_fallocate()
ext4: move ext4_mb_{get,put}_buddy_cache_lock and make them static
ext4: rename mark_bitmap_end() to ext4_mark_bitmap_end()
ext4: move flush_completed_IO to fs/ext4/fsync.c and make it static
ext4: rename {ext,idx}_pblock and inline small extent functions
ext4: make various ext4 functions be static
ext4: rename {exit,init}_ext4_*() to ext4_{exit,init}_*()
ext4: fix kernel oops if the journal superblock has a non-zero j_errno
ext4: update writeback_index based on last page scanned
ext4: implement writeback livelock avoidance using page tagging
ext4: tidy up a void argument in inode.c
ext4: add batched_discard into ext4 feature list
ext4: Add batched discard support for ext4
fs: Add FITRIM ioctl
ext4: Use return value from sb_issue_discard()
ext4: Check return value of sb_getblk() and friends
ext4: use bio layer instead of buffer layer in mpage_da_submit_io
...
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); |