summaryrefslogtreecommitdiff
path: root/libbcachefs.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2017-10-05 13:42:19 -0800
committerKent Overstreet <kent.overstreet@gmail.com>2017-10-08 10:25:36 -0800
commitbf8c59996b3fb2a940827d12438a9e18eca6db4c (patch)
tree86366ab663beeeeec3554ce3407159aaacd70714 /libbcachefs.h
parent85ee972555948337bb1a58f0702a4da95db6758f (diff)
Update for new superblock options; makefile improvements
Diffstat (limited to 'libbcachefs.h')
-rw-r--r--libbcachefs.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/libbcachefs.h b/libbcachefs.h
index 35ff73b..21dc859 100644
--- a/libbcachefs.h
+++ b/libbcachefs.h
@@ -16,6 +16,7 @@ struct format_opts {
unsigned block_size;
unsigned btree_node_size;
+ unsigned encoded_extent_max;
unsigned meta_replicas;
unsigned data_replicas;
@@ -35,6 +36,7 @@ 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_replicas = 1,
@@ -50,6 +52,7 @@ struct dev_opts {
u64 size; /* 512 byte sectors */
unsigned bucket_size;
unsigned tier;
+ unsigned data_allowed;
bool discard;
u64 nbuckets;
@@ -58,6 +61,13 @@ struct dev_opts {
u64 sb_end;
};
+static inline struct dev_opts dev_opts_default()
+{
+ return (struct dev_opts) {
+ .data_allowed = ~0 << 2,
+ };
+}
+
void bch2_pick_bucket_size(struct format_opts, struct dev_opts *);
struct bch_sb *bch2_format(struct format_opts, struct dev_opts *, size_t);