@@ -62,8 +62,7 @@ static void bch2_journal_buf_to_text(struct printbuf *out, struct journal *j, u6
62
62
prt_newline (out );
63
63
}
64
64
65
- prt_printf (out , "expires:\t" );
66
- prt_printf (out , "%li jiffies\n" , buf -> expires - jiffies );
65
+ prt_printf (out , "expires:\t%li jiffies\n" , buf -> expires - jiffies );
67
66
68
67
prt_printf (out , "flags:\t" );
69
68
if (buf -> noflush )
@@ -142,6 +141,8 @@ journal_error_check_stuck(struct journal *j, int error, unsigned flags)
142
141
bool stuck = false;
143
142
struct printbuf buf = PRINTBUF ;
144
143
144
+ buf .atomic ++ ;
145
+
145
146
if (!(error == - BCH_ERR_journal_full ||
146
147
error == - BCH_ERR_journal_pin_full ) ||
147
148
nr_unwritten_journal_entries (j ) ||
@@ -172,7 +173,7 @@ journal_error_check_stuck(struct journal *j, int error, unsigned flags)
172
173
bch_err (c , "Journal stuck! Hava a pre-reservation but journal full (error %s)" ,
173
174
bch2_err_str (error ));
174
175
bch2_journal_debug_to_text (& buf , j );
175
- bch_err ( c , "%s" , buf .buf );
176
+ bch2_print_string_as_lines ( KERN_ERR , buf .buf );
176
177
177
178
printbuf_reset (& buf );
178
179
bch2_journal_pins_to_text (& buf , j );
@@ -726,10 +727,10 @@ int bch2_journal_res_get_slowpath(struct journal *j, struct journal_res *res,
726
727
remaining_wait ))
727
728
return ret ;
728
729
730
+ bch_err (c , "Journal stuck? Waited for 10 seconds, err %s" , bch2_err_str (ret ));
729
731
struct printbuf buf = PRINTBUF ;
730
732
bch2_journal_debug_to_text (& buf , j );
731
- bch_err (c , "Journal stuck? Waited for 10 seconds...\n%s" ,
732
- buf .buf );
733
+ bch2_print_string_as_lines (KERN_ERR , buf .buf );
733
734
printbuf_exit (& buf );
734
735
735
736
closure_wait_event (& j -> async_wait ,
0 commit comments