@@ -1034,6 +1034,18 @@ void bch2_extent_ptr_to_text(struct printbuf *out, struct bch_fs *c, const struc
1034
1034
-- out -> atomic ;
1035
1035
}
1036
1036
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
+
1037
1049
void bch2_bkey_ptrs_to_text (struct printbuf * out , struct bch_fs * c ,
1038
1050
struct bkey_s_c k )
1039
1051
{
@@ -1059,13 +1071,7 @@ void bch2_bkey_ptrs_to_text(struct printbuf *out, struct bch_fs *c,
1059
1071
struct bch_extent_crc_unpacked crc =
1060
1072
bch2_extent_crc_unpack (k .k , entry_to_crc (entry ));
1061
1073
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 );
1069
1075
break ;
1070
1076
}
1071
1077
case BCH_EXTENT_ENTRY_stripe_ptr : {
@@ -1096,6 +1102,7 @@ void bch2_bkey_ptrs_to_text(struct printbuf *out, struct bch_fs *c,
1096
1102
}
1097
1103
}
1098
1104
1105
+
1099
1106
static int extent_ptr_invalid (struct bch_fs * c ,
1100
1107
struct bkey_s_c k ,
1101
1108
enum bch_validate_flags flags ,
0 commit comments