From 00f49631b2c65e93ef9ade1eb8248adb06253a57 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Sun, 20 May 2018 22:38:49 -0400 Subject: [PATCH] add patch remove-empty-lines-with-jbd2-debug --- remove-empty-lines-with-jbd2-debug | 44 ++++++++++++++++++++++++++++++++++++++ series | 1 + timestamps | 9 ++++---- 3 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 remove-empty-lines-with-jbd2-debug diff --git a/remove-empty-lines-with-jbd2-debug b/remove-empty-lines-with-jbd2-debug new file mode 100644 index 00000000..aef70ad8 --- /dev/null +++ b/remove-empty-lines-with-jbd2-debug @@ -0,0 +1,44 @@ +jbd2: remove bunch of empty lines with jbd2 debug + +From: Wang Shilong + +See following dmesg output with jbd2 debug enabled: + +...(start_this_handle, 313): New handle 00000000c88d6ceb going live. + +...(start_this_handle, 383): Handle 00000000c88d6ceb given 53 credits (total 53, free 32681) + +...(do_get_write_access, 838): journal_head 0000000002856fc0, force_copy 0 + +...(jbd2_journal_cancel_revoke, 421): journal_head 0000000002856fc0, cancelling revoke + +We have an extra line with every messages, this is a waste of buffer, +we can fix it by removing "\n" in the caller or remove it in +the __jbd2_debug(), i checked every jbd2_debug() passed '\n' explicitly. + +To avoid more lines, let's remove it inside __jbd2_debug(). + +Signed-off-by: Wang Shilong +Signed-off-by: Theodore Ts'o +Reviewed-by: Jan Kara +--- + fs/jbd2/journal.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c +index dfb0579..e942701 100644 +--- a/fs/jbd2/journal.c ++++ b/fs/jbd2/journal.c +@@ -114,7 +114,7 @@ void __jbd2_debug(int level, const char *file, const char *func, + va_start(args, fmt); + vaf.fmt = fmt; + vaf.va = &args; +- printk(KERN_DEBUG "%s: (%s, %u): %pV\n", file, func, line, &vaf); ++ printk(KERN_DEBUG "%s: (%s, %u): %pV", file, func, line, &vaf); + va_end(args); + } + EXPORT_SYMBOL(__jbd2_debug); +-- +1.8.3.1 + + diff --git a/series b/series index 18e41f44..03819e2c 100644 --- a/series +++ b/series @@ -15,6 +15,7 @@ add-the-sb_start_intwrite_trylock-helper factor-out-helper-ext4_sample_last_mounted do-not-update-s_last_mounted-of-a-frozen-fs handle-errors-on-ext4_commit_super +remove-empty-lines-with-jbd2-debug #################################################### # unstable patches diff --git a/timestamps b/timestamps index ec9baadc..79ab3569 100755 --- a/timestamps +++ b/timestamps @@ -44,11 +44,12 @@ touch -d @1526169300 fix-hole-length-detectin-in-ext4_ind_map_blocks touch -d @1526241709 add-new-return-type-vm_fault_t touch -d @1526244356 add-verifier-check-for-symlink-with-append-immtable-flags touch -d @1526254115 update-mtime-in-ext4_punch_hole-even-if-no-blocks-removed -touch -d @1526254175 stable-boundary touch -d @1526265630 add-the-sb_start_intwrite_trylock-helper touch -d @1526265863 factor-out-helper-ext4_sample_last_mounted touch -d @1526266484 do-not-update-s_last_mounted-of-a-frozen-fs touch -d @1526266939 handle-errors-on-ext4_commit_super -touch -d @1526266982 series -touch -d @1526266986 status -touch -d @1526269624 timestamps +touch -d @1526266999 stable-boundary +touch -d @1526868869 remove-empty-lines-with-jbd2-debug +touch -d @1526869033 timestamps +touch -d @1526869153 series +touch -d @1526869202 status -- 2.11.4.GIT