| .. | .. |
|---|
| 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 */ |
|---|
| .. | .. |
|---|
| 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 */ |
|---|