diff options
author | Joe Perches <joe@perches.com> | 2016-10-15 09:57:31 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2016-10-15 09:57:31 -0400 |
commit | d74f3d25289aa9722cf777a7482eeee2eacdf46e (patch) | |
tree | 8c4d29f3168cb64a5117865b00a6dbd09ecda11b | |
parent | 8906a8223ad4909b391c5628f7991ebceda30e52 (diff) |
ext4: add missing KERN_CONT to a few more debugging uses
Recent commits require line continuing printks to always use
pr_cont or KERN_CONT. Add these markings to a few more printks.
Miscellaneaous:
o Integrate the ea_idebug and ea_bdebug macros to use a single
call to printk(KERN_DEBUG instead of 3 separate printks
o Use the more common varargs macro style
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
-rw-r--r-- | fs/ext4/block_validity.c | 4 | ||||
-rw-r--r-- | fs/ext4/mballoc.h | 17 | ||||
-rw-r--r-- | fs/ext4/namei.c | 18 | ||||
-rw-r--r-- | fs/ext4/xattr.c | 18 |
4 files changed, 26 insertions, 31 deletions
diff --git a/fs/ext4/block_validity.c b/fs/ext4/block_validity.c index 02ddec6d8a7d..fdb19543af1e 100644 --- a/fs/ext4/block_validity.c +++ b/fs/ext4/block_validity.c | |||
@@ -128,12 +128,12 @@ static void debug_print_tree(struct ext4_sb_info *sbi) | |||
128 | node = rb_first(&sbi->system_blks); | 128 | node = rb_first(&sbi->system_blks); |
129 | while (node) { | 129 | while (node) { |
130 | entry = rb_entry(node, struct ext4_system_zone, node); | 130 | entry = rb_entry(node, struct ext4_system_zone, node); |
131 | printk("%s%llu-%llu", first ? "" : ", ", | 131 | printk(KERN_CONT "%s%llu-%llu", first ? "" : ", ", |
132 | entry->start_blk, entry->start_blk + entry->count - 1); | 132 | entry->start_blk, entry->start_blk + entry->count - 1); |
133 | first = 0; | 133 | first = 0; |
134 | node = rb_next(node); | 134 | node = rb_next(node); |
135 | } | 135 | } |
136 | printk("\n"); | 136 | printk(KERN_CONT "\n"); |
137 | } | 137 | } |
138 | 138 | ||
139 | int ext4_setup_system_zone(struct super_block *sb) | 139 | int ext4_setup_system_zone(struct super_block *sb) |
diff --git a/fs/ext4/mballoc.h b/fs/ext4/mballoc.h index 3ef1df6ae9ec..1aba469f8220 100644 --- a/fs/ext4/mballoc.h +++ b/fs/ext4/mballoc.h | |||
@@ -27,16 +27,15 @@ | |||
27 | #ifdef CONFIG_EXT4_DEBUG | 27 | #ifdef CONFIG_EXT4_DEBUG |
28 | extern ushort ext4_mballoc_debug; | 28 | extern ushort ext4_mballoc_debug; |
29 | 29 | ||
30 | #define mb_debug(n, fmt, a...) \ | 30 | #define mb_debug(n, fmt, ...) \ |
31 | do { \ | 31 | do { \ |
32 | if ((n) <= ext4_mballoc_debug) { \ | 32 | if ((n) <= ext4_mballoc_debug) { \ |
33 | printk(KERN_DEBUG "(%s, %d): %s: ", \ | 33 | printk(KERN_DEBUG "(%s, %d): %s: " fmt, \ |
34 | __FILE__, __LINE__, __func__); \ | 34 | __FILE__, __LINE__, __func__, ##__VA_ARGS__); \ |
35 | printk(fmt, ## a); \ | 35 | } \ |
36 | } \ | 36 | } while (0) |
37 | } while (0) | ||
38 | #else | 37 | #else |
39 | #define mb_debug(n, fmt, a...) no_printk(fmt, ## a) | 38 | #define mb_debug(n, fmt, ...) no_printk(fmt, ##__VA_ARGS__) |
40 | #endif | 39 | #endif |
41 | 40 | ||
42 | #define EXT4_MB_HISTORY_ALLOC 1 /* allocation */ | 41 | #define EXT4_MB_HISTORY_ALLOC 1 /* allocation */ |
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index f92f10d4f66a..104f8bfba718 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c | |||
@@ -577,12 +577,13 @@ static inline unsigned dx_node_limit(struct inode *dir) | |||
577 | static void dx_show_index(char * label, struct dx_entry *entries) | 577 | static void dx_show_index(char * label, struct dx_entry *entries) |
578 | { | 578 | { |
579 | int i, n = dx_get_count (entries); | 579 | int i, n = dx_get_count (entries); |
580 | printk(KERN_DEBUG "%s index ", label); | 580 | printk(KERN_DEBUG "%s index", label); |
581 | for (i = 0; i < n; i++) { | 581 | for (i = 0; i < n; i++) { |
582 | printk("%x->%lu ", i ? dx_get_hash(entries + i) : | 582 | printk(KERN_CONT " %x->%lu", |
583 | 0, (unsigned long)dx_get_block(entries + i)); | 583 | i ? dx_get_hash(entries + i) : 0, |
584 | (unsigned long)dx_get_block(entries + i)); | ||
584 | } | 585 | } |
585 | printk("\n"); | 586 | printk(KERN_CONT "\n"); |
586 | } | 587 | } |
587 | 588 | ||
588 | struct stats | 589 | struct stats |
@@ -679,7 +680,7 @@ static struct stats dx_show_leaf(struct inode *dir, | |||
679 | } | 680 | } |
680 | de = ext4_next_entry(de, size); | 681 | de = ext4_next_entry(de, size); |
681 | } | 682 | } |
682 | printk("(%i)\n", names); | 683 | printk(KERN_CONT "(%i)\n", names); |
683 | return (struct stats) { names, space, 1 }; | 684 | return (struct stats) { names, space, 1 }; |
684 | } | 685 | } |
685 | 686 | ||
@@ -798,7 +799,7 @@ dx_probe(struct ext4_filename *fname, struct inode *dir, | |||
798 | q = entries + count - 1; | 799 | q = entries + count - 1; |
799 | while (p <= q) { | 800 | while (p <= q) { |
800 | m = p + (q - p) / 2; | 801 | m = p + (q - p) / 2; |
801 | dxtrace(printk(".")); | 802 | dxtrace(printk(KERN_CONT ".")); |
802 | if (dx_get_hash(m) > hash) | 803 | if (dx_get_hash(m) > hash) |
803 | q = m - 1; | 804 | q = m - 1; |
804 | else | 805 | else |
@@ -810,7 +811,7 @@ dx_probe(struct ext4_filename *fname, struct inode *dir, | |||
810 | at = entries; | 811 | at = entries; |
811 | while (n--) | 812 | while (n--) |
812 | { | 813 | { |
813 | dxtrace(printk(",")); | 814 | dxtrace(printk(KERN_CONT ",")); |
814 | if (dx_get_hash(++at) > hash) | 815 | if (dx_get_hash(++at) > hash) |
815 | { | 816 | { |
816 | at--; | 817 | at--; |
@@ -821,7 +822,8 @@ dx_probe(struct ext4_filename *fname, struct inode *dir, | |||
821 | } | 822 | } |
822 | 823 | ||
823 | at = p - 1; | 824 | at = p - 1; |
824 | dxtrace(printk(" %x->%u\n", at == entries ? 0 : dx_get_hash(at), | 825 | dxtrace(printk(KERN_CONT " %x->%u\n", |
826 | at == entries ? 0 : dx_get_hash(at), | ||
825 | dx_get_block(at))); | 827 | dx_get_block(at))); |
826 | frame->entries = entries; | 828 | frame->entries = entries; |
827 | frame->at = at; | 829 | frame->at = at; |
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index e90c5cd04d89..d77be9e9f535 100644 --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c | |||
@@ -61,18 +61,12 @@ | |||
61 | #include "acl.h" | 61 | #include "acl.h" |
62 | 62 | ||
63 | #ifdef EXT4_XATTR_DEBUG | 63 | #ifdef EXT4_XATTR_DEBUG |
64 | # define ea_idebug(inode, f...) do { \ | 64 | # define ea_idebug(inode, fmt, ...) \ |
65 | printk(KERN_DEBUG "inode %s:%lu: ", \ | 65 | printk(KERN_DEBUG "inode %s:%lu: " fmt "\n", \ |
66 | inode->i_sb->s_id, inode->i_ino); \ | 66 | inode->i_sb->s_id, inode->i_ino, ##__VA_ARGS__) |
67 | printk(f); \ | 67 | # define ea_bdebug(bh, fmt, ...) \ |
68 | printk("\n"); \ | 68 | printk(KERN_DEBUG "block %pg:%lu: " fmt "\n", \ |
69 | } while (0) | 69 | bh->b_bdev, (unsigned long)bh->b_blocknr, ##__VA_ARGS__) |
70 | # define ea_bdebug(bh, f...) do { \ | ||
71 | printk(KERN_DEBUG "block %pg:%lu: ", \ | ||
72 | bh->b_bdev, (unsigned long) bh->b_blocknr); \ | ||
73 | printk(f); \ | ||
74 | printk("\n"); \ | ||
75 | } while (0) | ||
76 | #else | 70 | #else |
77 | # define ea_idebug(inode, fmt, ...) no_printk(fmt, ##__VA_ARGS__) | 71 | # define ea_idebug(inode, fmt, ...) no_printk(fmt, ##__VA_ARGS__) |
78 | # define ea_bdebug(bh, fmt, ...) no_printk(fmt, ##__VA_ARGS__) | 72 | # define ea_bdebug(bh, fmt, ...) no_printk(fmt, ##__VA_ARGS__) |