fix default checksum types

This commit is contained in:
Kent Overstreet 2017-12-15 12:57:40 -05:00
parent ea83a3985d
commit 5053c6ed25
2 changed files with 13 additions and 9 deletions

View File

@ -334,11 +334,11 @@ void bch2_super_print(struct bch_sb *sb, int units)
"Metadata replicas: have %llu, want %llu\n"
"Data replicas: have %llu, want %llu\n"
"Metadata checksum type: %s\n"
"Data checksum type: %s\n"
"Compression type: %s\n"
"Metadata checksum type: %s (%llu)\n"
"Data checksum type: %s (%llu)\n"
"Compression type: %s (%llu)\n"
"String hash type: %s\n"
"String hash type: %s (%llu)\n"
"32 bit inodes: %llu\n"
"GC reserve percentage: %llu%%\n"
"Root reserve percentage: %llu%%\n"
@ -362,21 +362,25 @@ void bch2_super_print(struct bch_sb *sb, int units)
0LLU, //BCH_SB_DATA_REPLICAS_HAVE(sb),
BCH_SB_DATA_REPLICAS_WANT(sb),
BCH_SB_META_CSUM_TYPE(sb) < BCH_CSUM_NR
BCH_SB_META_CSUM_TYPE(sb) < BCH_CSUM_OPT_NR
? bch2_csum_types[BCH_SB_META_CSUM_TYPE(sb)]
: "unknown",
BCH_SB_META_CSUM_TYPE(sb),
BCH_SB_DATA_CSUM_TYPE(sb) < BCH_CSUM_NR
BCH_SB_DATA_CSUM_TYPE(sb) < BCH_CSUM_OPT_NR
? bch2_csum_types[BCH_SB_DATA_CSUM_TYPE(sb)]
: "unknown",
BCH_SB_DATA_CSUM_TYPE(sb),
BCH_SB_COMPRESSION_TYPE(sb) < BCH_COMPRESSION_NR
BCH_SB_COMPRESSION_TYPE(sb) < BCH_COMPRESSION_OPT_NR
? bch2_compression_types[BCH_SB_COMPRESSION_TYPE(sb)]
: "unknown",
BCH_SB_COMPRESSION_TYPE(sb),
BCH_SB_STR_HASH_TYPE(sb) < BCH_STR_HASH_NR
? bch2_str_hash_types[BCH_SB_STR_HASH_TYPE(sb)]
: "unknown",
BCH_SB_STR_HASH_TYPE(sb),
BCH_SB_INODE_32BIT(sb),
BCH_SB_GC_RESERVE(sb),

View File

@ -37,8 +37,8 @@ static inline struct format_opts format_opts_default()
return (struct format_opts) {
.on_error_action = BCH_ON_ERROR_RO,
.encoded_extent_max = 128,
.meta_csum_type = BCH_CSUM_CRC32C,
.data_csum_type = BCH_CSUM_CRC32C,
.meta_csum_type = BCH_CSUM_OPT_CRC32C,
.data_csum_type = BCH_CSUM_OPT_CRC32C,
.meta_replicas = 1,
.data_replicas = 1,
.meta_replicas_required = 1,