4 #include <linux/uuid.h>
7 #include "bcachefs_format.h"
8 #include "tools-util.h"
19 extern enum fsck_err_opts fsck_err_opt;
25 unsigned on_error_action;
26 unsigned max_journal_entry_size; /* will be removed */
29 unsigned btree_node_size;
31 unsigned meta_replicas;
32 unsigned data_replicas;
34 unsigned meta_replicas_required;
35 unsigned data_replicas_required;
37 unsigned meta_csum_type;
38 unsigned data_csum_type;
39 unsigned compression_type;
45 static inline struct format_opts format_opts_default()
47 return (struct format_opts) {
48 .on_error_action = BCH_ON_ERROR_RO,
49 .meta_csum_type = BCH_CSUM_CRC32C,
50 .data_csum_type = BCH_CSUM_CRC32C,
53 .meta_replicas_required = 1,
54 .data_replicas_required = 1,
61 u64 size; /* 512 byte sectors */
72 struct bch_sb *bcache_format(struct format_opts, struct dev_opts *, size_t);
74 void bcache_super_write(int, struct bch_sb *);
75 struct bch_sb *__bcache_super_read(int, u64);
76 struct bch_sb *bcache_super_read(const char *);
78 void bcache_super_print(struct bch_sb *, int);
80 #endif /* _LIBBCACHE_H */