diff options
Diffstat (limited to 'fs/ext4/mballoc.h')
-rw-r--r-- | fs/ext4/mballoc.h | 35 |
1 files changed, 1 insertions, 34 deletions
diff --git a/fs/ext4/mballoc.h b/fs/ext4/mballoc.h index 188d3d709b24..0ca811061bc7 100644 --- a/fs/ext4/mballoc.h +++ b/fs/ext4/mballoc.h | |||
@@ -52,18 +52,8 @@ extern u8 mb_enable_debug; | |||
52 | #define mb_debug(n, fmt, a...) | 52 | #define mb_debug(n, fmt, a...) |
53 | #endif | 53 | #endif |
54 | 54 | ||
55 | /* | ||
56 | * with EXT4_MB_HISTORY mballoc stores last N allocations in memory | ||
57 | * and you can monitor it in /proc/fs/ext4/<dev>/mb_history | ||
58 | */ | ||
59 | #define EXT4_MB_HISTORY | ||
60 | #define EXT4_MB_HISTORY_ALLOC 1 /* allocation */ | 55 | #define EXT4_MB_HISTORY_ALLOC 1 /* allocation */ |
61 | #define EXT4_MB_HISTORY_PREALLOC 2 /* preallocated blocks used */ | 56 | #define EXT4_MB_HISTORY_PREALLOC 2 /* preallocated blocks used */ |
62 | #define EXT4_MB_HISTORY_DISCARD 4 /* preallocation discarded */ | ||
63 | #define EXT4_MB_HISTORY_FREE 8 /* free */ | ||
64 | |||
65 | #define EXT4_MB_HISTORY_DEFAULT (EXT4_MB_HISTORY_ALLOC | \ | ||
66 | EXT4_MB_HISTORY_PREALLOC) | ||
67 | 57 | ||
68 | /* | 58 | /* |
69 | * How long mballoc can look for a best extent (in found extents) | 59 | * How long mballoc can look for a best extent (in found extents) |
@@ -84,7 +74,7 @@ extern u8 mb_enable_debug; | |||
84 | * with 'ext4_mb_stats' allocator will collect stats that will be | 74 | * with 'ext4_mb_stats' allocator will collect stats that will be |
85 | * shown at umount. The collecting costs though! | 75 | * shown at umount. The collecting costs though! |
86 | */ | 76 | */ |
87 | #define MB_DEFAULT_STATS 1 | 77 | #define MB_DEFAULT_STATS 0 |
88 | 78 | ||
89 | /* | 79 | /* |
90 | * files smaller than MB_DEFAULT_STREAM_THRESHOLD are served | 80 | * files smaller than MB_DEFAULT_STREAM_THRESHOLD are served |
@@ -217,22 +207,6 @@ struct ext4_allocation_context { | |||
217 | #define AC_STATUS_FOUND 2 | 207 | #define AC_STATUS_FOUND 2 |
218 | #define AC_STATUS_BREAK 3 | 208 | #define AC_STATUS_BREAK 3 |
219 | 209 | ||
220 | struct ext4_mb_history { | ||
221 | struct ext4_free_extent orig; /* orig allocation */ | ||
222 | struct ext4_free_extent goal; /* goal allocation */ | ||
223 | struct ext4_free_extent result; /* result allocation */ | ||
224 | unsigned pid; | ||
225 | unsigned ino; | ||
226 | __u16 found; /* how many extents have been found */ | ||
227 | __u16 groups; /* how many groups have been scanned */ | ||
228 | __u16 tail; /* what tail broke some buddy */ | ||
229 | __u16 buddy; /* buddy the tail ^^^ broke */ | ||
230 | __u16 flags; | ||
231 | __u8 cr:3; /* which phase the result extent was found at */ | ||
232 | __u8 op:4; | ||
233 | __u8 merged:1; | ||
234 | }; | ||
235 | |||
236 | struct ext4_buddy { | 210 | struct ext4_buddy { |
237 | struct page *bd_buddy_page; | 211 | struct page *bd_buddy_page; |
238 | void *bd_buddy; | 212 | void *bd_buddy; |
@@ -247,13 +221,6 @@ struct ext4_buddy { | |||
247 | #define EXT4_MB_BITMAP(e4b) ((e4b)->bd_bitmap) | 221 | #define EXT4_MB_BITMAP(e4b) ((e4b)->bd_bitmap) |
248 | #define EXT4_MB_BUDDY(e4b) ((e4b)->bd_buddy) | 222 | #define EXT4_MB_BUDDY(e4b) ((e4b)->bd_buddy) |
249 | 223 | ||
250 | #ifndef EXT4_MB_HISTORY | ||
251 | static inline void ext4_mb_store_history(struct ext4_allocation_context *ac) | ||
252 | { | ||
253 | return; | ||
254 | } | ||
255 | #endif | ||
256 | |||
257 | #define in_range(b, first, len) ((b) >= (first) && (b) <= (first) + (len) - 1) | 224 | #define in_range(b, first, len) ((b) >= (first) && (b) <= (first) + (len) - 1) |
258 | 225 | ||
259 | static inline ext4_fsblk_t ext4_grp_offs_to_block(struct super_block *sb, | 226 | static inline ext4_fsblk_t ext4_grp_offs_to_block(struct super_block *sb, |