forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/fs/ext4/mballoc.h
....@@ -24,19 +24,15 @@
2424 #include "ext4.h"
2525
2626 /*
27
+ * mb_debug() dynamic printk msgs could be used to debug mballoc code.
2728 */
2829 #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__)
3834 #else
39
-#define mb_debug(n, fmt, ...) no_printk(fmt, ##__VA_ARGS__)
35
+#define mb_debug(sb, fmt, ...) no_printk(fmt, ##__VA_ARGS__)
4036 #endif
4137
4238 #define EXT4_MB_HISTORY_ALLOC 1 /* allocation */
....@@ -77,6 +73,10 @@
7773 */
7874 #define MB_DEFAULT_GROUP_PREALLOC 512
7975
76
+/*
77
+ * maximum length of inode prealloc list
78
+ */
79
+#define MB_DEFAULT_MAX_INODE_PREALLOC 512
8080
8181 struct ext4_free_data {
8282 /* this links the free block information from sb_info */