aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/ext4.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r--fs/ext4/ext4.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index d01d62315f7e..e6185031c1cc 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -29,6 +29,7 @@
29#include <linux/wait.h> 29#include <linux/wait.h>
30#include <linux/blockgroup_lock.h> 30#include <linux/blockgroup_lock.h>
31#include <linux/percpu_counter.h> 31#include <linux/percpu_counter.h>
32#include <linux/ratelimit.h>
32#include <crypto/hash.h> 33#include <crypto/hash.h>
33#ifdef __KERNEL__ 34#ifdef __KERNEL__
34#include <linux/compat.h> 35#include <linux/compat.h>
@@ -1314,6 +1315,11 @@ struct ext4_sb_info {
1314 unsigned long s_es_last_sorted; 1315 unsigned long s_es_last_sorted;
1315 struct percpu_counter s_extent_cache_cnt; 1316 struct percpu_counter s_extent_cache_cnt;
1316 spinlock_t s_es_lru_lock ____cacheline_aligned_in_smp; 1317 spinlock_t s_es_lru_lock ____cacheline_aligned_in_smp;
1318
1319 /* Ratelimit ext4 messages. */
1320 struct ratelimit_state s_err_ratelimit_state;
1321 struct ratelimit_state s_warning_ratelimit_state;
1322 struct ratelimit_state s_msg_ratelimit_state;
1317}; 1323};
1318 1324
1319static inline struct ext4_sb_info *EXT4_SB(struct super_block *sb) 1325static inline struct ext4_sb_info *EXT4_SB(struct super_block *sb)
@@ -1396,7 +1402,18 @@ static inline void ext4_clear_inode_##name(struct inode *inode, int bit) \
1396 clear_bit(bit + (offset), &EXT4_I(inode)->i_##field); \ 1402 clear_bit(bit + (offset), &EXT4_I(inode)->i_##field); \
1397} 1403}
1398 1404
1405/* Add these declarations here only so that these functions can be
1406 * found by name. Otherwise, they are very hard to locate. */
1407static inline int ext4_test_inode_flag(struct inode *inode, int bit);
1408static inline void ext4_set_inode_flag(struct inode *inode, int bit);
1409static inline void ext4_clear_inode_flag(struct inode *inode, int bit);
1399EXT4_INODE_BIT_FNS(flag, flags, 0) 1410EXT4_INODE_BIT_FNS(flag, flags, 0)
1411
1412/* Add these declarations here only so that these functions can be
1413 * found by name. Otherwise, they are very hard to locate. */
1414static inline int ext4_test_inode_state(struct inode *inode, int bit);
1415static inline void ext4_set_inode_state(struct inode *inode, int bit);
1416static inline void ext4_clear_inode_state(struct inode *inode, int bit);
1400#if (BITS_PER_LONG < 64) 1417#if (BITS_PER_LONG < 64)
1401EXT4_INODE_BIT_FNS(state, state_flags, 0) 1418EXT4_INODE_BIT_FNS(state, state_flags, 0)
1402 1419