@@ -2117,8 +2117,14 @@ static void btree_node_write_work(struct work_struct *work)
2117
2117
return ;
2118
2118
err :
2119
2119
set_btree_node_noevict (b );
2120
- bch2_fs_fatal_err_on (!bch2_err_matches (ret , EROFS ), c ,
2121
- "writing btree node: %s" , bch2_err_str (ret ));
2120
+
2121
+ if (!bch2_err_matches (ret , EROFS )) {
2122
+ struct printbuf buf = PRINTBUF ;
2123
+ prt_printf (& buf , "writing btree node: %s\n " , bch2_err_str (ret ));
2124
+ bch2_btree_pos_to_text (& buf , c , b );
2125
+ bch2_fs_fatal_error (c , "%s" , buf .buf );
2126
+ printbuf_exit (& buf );
2127
+ }
2122
2128
goto out ;
2123
2129
}
2124
2130
@@ -2135,10 +2141,14 @@ static void btree_node_write_endio(struct bio *bio)
2135
2141
bch2_account_io_completion (ca , BCH_MEMBER_ERROR_write ,
2136
2142
wbio -> submit_time , !bio -> bi_status );
2137
2143
2138
- if (ca && bio -> bi_status )
2139
- bch_err_dev_ratelimited (ca ,
2140
- "btree write error: %s" ,
2141
- bch2_blk_status_to_str (bio -> bi_status ));
2144
+ if (ca && bio -> bi_status ) {
2145
+ struct printbuf buf = PRINTBUF ;
2146
+ prt_printf (& buf , "btree write error: %s\n " ,
2147
+ bch2_blk_status_to_str (bio -> bi_status ));
2148
+ bch2_btree_pos_to_text (& buf , c , b );
2149
+ bch_err_dev_ratelimited (ca , "%s" , buf .buf );
2150
+ printbuf_exit (& buf );
2151
+ }
2142
2152
2143
2153
if (bio -> bi_status ) {
2144
2154
unsigned long flags ;
0 commit comments