@@ -1034,6 +1034,18 @@ void bch2_extent_ptr_to_text(struct printbuf *out, struct bch_fs *c, const struc
10341034 -- out -> atomic ;
10351035}
10361036
1037+ void bch2_extent_crc_unpacked_to_text (struct printbuf * out , struct bch_extent_crc_unpacked * crc )
1038+ {
1039+ prt_printf (out , "crc: c_size %u size %u offset %u nonce %u csum " ,
1040+ crc -> compressed_size ,
1041+ crc -> uncompressed_size ,
1042+ crc -> offset , crc -> nonce );
1043+ bch2_prt_csum_type (out , crc -> csum_type );
1044+ prt_printf (out , " %0llx:%0llx " , crc -> csum .hi , crc -> csum .lo );
1045+ prt_str (out , " compress " );
1046+ bch2_prt_compression_type (out , crc -> compression_type );
1047+ }
1048+
10371049void bch2_bkey_ptrs_to_text (struct printbuf * out , struct bch_fs * c ,
10381050 struct bkey_s_c k )
10391051{
@@ -1059,13 +1071,7 @@ void bch2_bkey_ptrs_to_text(struct printbuf *out, struct bch_fs *c,
10591071 struct bch_extent_crc_unpacked crc =
10601072 bch2_extent_crc_unpack (k .k , entry_to_crc (entry ));
10611073
1062- prt_printf (out , "crc: c_size %u size %u offset %u nonce %u csum " ,
1063- crc .compressed_size ,
1064- crc .uncompressed_size ,
1065- crc .offset , crc .nonce );
1066- bch2_prt_csum_type (out , crc .csum_type );
1067- prt_str (out , " compress " );
1068- bch2_prt_compression_type (out , crc .compression_type );
1074+ bch2_extent_crc_unpacked_to_text (out , & crc );
10691075 break ;
10701076 }
10711077 case BCH_EXTENT_ENTRY_stripe_ptr : {
@@ -1096,6 +1102,7 @@ void bch2_bkey_ptrs_to_text(struct printbuf *out, struct bch_fs *c,
10961102 }
10971103}
10981104
1105+
10991106static int extent_ptr_invalid (struct bch_fs * c ,
11001107 struct bkey_s_c k ,
11011108 enum bch_validate_flags flags ,
0 commit comments