4 #include <linux/uuid.h>
7 #include "bcachefs_format.h"
8 #include "tools-util.h"
15 unsigned on_error_action;
16 unsigned max_journal_entry_size; /* will be removed */
19 unsigned btree_node_size;
21 unsigned meta_replicas;
22 unsigned data_replicas;
24 unsigned meta_replicas_required;
25 unsigned data_replicas_required;
27 unsigned meta_csum_type;
28 unsigned data_csum_type;
29 unsigned compression_type;
35 static inline struct format_opts format_opts_default()
37 return (struct format_opts) {
38 .on_error_action = BCH_ON_ERROR_RO,
39 .meta_csum_type = BCH_CSUM_CRC32C,
40 .data_csum_type = BCH_CSUM_CRC32C,
43 .meta_replicas_required = 1,
44 .data_replicas_required = 1,
51 u64 size; /* 512 byte sectors */
62 struct bch_sb *bcache_format(struct format_opts, struct dev_opts *, size_t);
64 void bcache_super_write(int, struct bch_sb *);
65 struct bch_sb *__bcache_super_read(int, u64);
66 struct bch_sb *bcache_super_read(const char *);
68 void bcache_super_print(struct bch_sb *, int);
70 #endif /* _LIBBCACHE_H */