.. | .. |
---|
24 | 24 | #include "ext4.h" |
---|
25 | 25 | |
---|
26 | 26 | /* |
---|
| 27 | + * mb_debug() dynamic printk msgs could be used to debug mballoc code. |
---|
27 | 28 | */ |
---|
28 | 29 | #ifdef CONFIG_EXT4_DEBUG |
---|
29 | | -extern ushort ext4_mballoc_debug; |
---|
30 | | - |
---|
31 | | -#define mb_debug(n, fmt, ...) \ |
---|
32 | | -do { \ |
---|
33 | | - if ((n) <= ext4_mballoc_debug) { \ |
---|
34 | | - printk(KERN_DEBUG "(%s, %d): %s: " fmt, \ |
---|
35 | | - __FILE__, __LINE__, __func__, ##__VA_ARGS__); \ |
---|
36 | | - } \ |
---|
37 | | -} while (0) |
---|
| 30 | +#define mb_debug(sb, fmt, ...) \ |
---|
| 31 | + pr_debug("[%s/%d] EXT4-fs (%s): (%s, %d): %s: " fmt, \ |
---|
| 32 | + current->comm, task_pid_nr(current), sb->s_id, \ |
---|
| 33 | + __FILE__, __LINE__, __func__, ##__VA_ARGS__) |
---|
38 | 34 | #else |
---|
39 | | -#define mb_debug(n, fmt, ...) no_printk(fmt, ##__VA_ARGS__) |
---|
| 35 | +#define mb_debug(sb, fmt, ...) no_printk(fmt, ##__VA_ARGS__) |
---|
40 | 36 | #endif |
---|
41 | 37 | |
---|
42 | 38 | #define EXT4_MB_HISTORY_ALLOC 1 /* allocation */ |
---|
.. | .. |
---|
63 | 59 | * by the stream allocator, which purpose is to pack requests |
---|
64 | 60 | * as close each to other as possible to produce smooth I/O traffic |
---|
65 | 61 | * We use locality group prealloc space for stream request. |
---|
66 | | - * We can tune the same via /proc/fs/ext4/<parition>/stream_req |
---|
| 62 | + * We can tune the same via /proc/fs/ext4/<partition>/stream_req |
---|
67 | 63 | */ |
---|
68 | 64 | #define MB_DEFAULT_STREAM_THRESHOLD 16 /* 64K */ |
---|
69 | 65 | |
---|
.. | .. |
---|
77 | 73 | */ |
---|
78 | 74 | #define MB_DEFAULT_GROUP_PREALLOC 512 |
---|
79 | 75 | |
---|
| 76 | +/* |
---|
| 77 | + * maximum length of inode prealloc list |
---|
| 78 | + */ |
---|
| 79 | +#define MB_DEFAULT_MAX_INODE_PREALLOC 512 |
---|
80 | 80 | |
---|
81 | 81 | struct ext4_free_data { |
---|
82 | 82 | /* this links the free block information from sb_info */ |
---|