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.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index d13f3b509886..62cee2b6fe79 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -1215,6 +1215,9 @@ struct ext4_sb_info {
1215 1215
1216 /* Kernel thread for multiple mount protection */ 1216 /* Kernel thread for multiple mount protection */
1217 struct task_struct *s_mmp_tsk; 1217 struct task_struct *s_mmp_tsk;
1218
1219 /* record the last minlen when FITRIM is called. */
1220 atomic_t s_last_trim_minblks;
1218}; 1221};
1219 1222
1220static inline struct ext4_sb_info *EXT4_SB(struct super_block *sb) 1223static inline struct ext4_sb_info *EXT4_SB(struct super_block *sb)
@@ -2080,11 +2083,19 @@ struct ext4_group_info {
2080 * 5 free 8-block regions. */ 2083 * 5 free 8-block regions. */
2081}; 2084};
2082 2085
2083#define EXT4_GROUP_INFO_NEED_INIT_BIT 0 2086#define EXT4_GROUP_INFO_NEED_INIT_BIT 0
2087#define EXT4_GROUP_INFO_WAS_TRIMMED_BIT 1
2084 2088
2085#define EXT4_MB_GRP_NEED_INIT(grp) \ 2089#define EXT4_MB_GRP_NEED_INIT(grp) \
2086 (test_bit(EXT4_GROUP_INFO_NEED_INIT_BIT, &((grp)->bb_state))) 2090 (test_bit(EXT4_GROUP_INFO_NEED_INIT_BIT, &((grp)->bb_state)))
2087 2091
2092#define EXT4_MB_GRP_WAS_TRIMMED(grp) \
2093 (test_bit(EXT4_GROUP_INFO_WAS_TRIMMED_BIT, &((grp)->bb_state)))
2094#define EXT4_MB_GRP_SET_TRIMMED(grp) \
2095 (set_bit(EXT4_GROUP_INFO_WAS_TRIMMED_BIT, &((grp)->bb_state)))
2096#define EXT4_MB_GRP_CLEAR_TRIMMED(grp) \
2097 (clear_bit(EXT4_GROUP_INFO_WAS_TRIMMED_BIT, &((grp)->bb_state)))
2098
2088#define EXT4_MAX_CONTENTION 8 2099#define EXT4_MAX_CONTENTION 8
2089#define EXT4_CONTENTION_THRESHOLD 2 2100#define EXT4_CONTENTION_THRESHOLD 2
2090 2101