@@ -411,6 +411,16 @@ void bch2_write_op_error(struct printbuf *out, struct bch_write_op *op)
411
411
__bch2_write_op_error (out , op , op -> pos .offset );
412
412
}
413
413
414
+ static void bch2_write_op_error_trans (struct btree_trans * trans , struct printbuf * out ,
415
+ struct bch_write_op * op , u64 offset )
416
+ {
417
+ bch2_inum_offset_err_msg_trans (trans , out ,
418
+ (subvol_inum ) { op -> subvol , op -> pos .inode , },
419
+ offset << 9 );
420
+ prt_printf (out , "write error%s: " ,
421
+ op -> flags & BCH_WRITE_MOVE ? "(internal move)" : "" );
422
+ }
423
+
414
424
void bch2_submit_wbio_replicas (struct bch_write_bio * wbio , struct bch_fs * c ,
415
425
enum bch_data_type type ,
416
426
const struct bkey_i * k ,
@@ -1193,7 +1203,7 @@ static void bch2_nocow_write_convert_unwritten(struct bch_write_op *op)
1193
1203
struct bkey_i * insert = bch2_keylist_front (& op -> insert_keys );
1194
1204
1195
1205
struct printbuf buf = PRINTBUF ;
1196
- __bch2_write_op_error ( & buf , op , bkey_start_offset (& insert -> k ));
1206
+ bch2_write_op_error_trans ( trans , & buf , op , bkey_start_offset (& insert -> k ));
1197
1207
prt_printf (& buf , "btree update error: %s" , bch2_err_str (ret ));
1198
1208
bch_err_ratelimited (c , "%s" , buf .buf );
1199
1209
printbuf_exit (& buf );
0 commit comments