summaryrefslogtreecommitdiff
path: root/libbcachefs/ec.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2020-08-24 16:05:04 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2020-08-24 16:25:05 -0400
commitcd9892e543845e045142ed29e4a5a9ce446a205e (patch)
tree1556289a5366d5cdfff32f9669cf748e39ed5063 /libbcachefs/ec.h
parent21ade396535e51503511f42ea06d58e25c0646c5 (diff)
Update bcachefs sources to 10ab39f2fa bcachefs: Improvements to the journal read error paths
Diffstat (limited to 'libbcachefs/ec.h')
-rw-r--r--libbcachefs/ec.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/libbcachefs/ec.h b/libbcachefs/ec.h
index 4dfaac0..f8fc3d6 100644
--- a/libbcachefs/ec.h
+++ b/libbcachefs/ec.h
@@ -93,9 +93,17 @@ struct ec_stripe_new {
int err;
+ u8 nr_data;
+ u8 nr_parity;
+ bool allocated;
+ bool pending;
+ bool existing_stripe;
+ u64 existing_stripe_idx;
+
unsigned long blocks_allocated[BITS_TO_LONGS(EC_STRIPE_MAX)];
struct open_buckets blocks;
+ u8 data_block_idx[EC_STRIPE_MAX];
struct open_buckets parity;
struct keylist keys;
@@ -108,8 +116,6 @@ struct ec_stripe_head {
struct list_head list;
struct mutex lock;
- struct list_head stripes;
-
unsigned target;
unsigned algo;
unsigned redundancy;
@@ -122,9 +128,6 @@ struct ec_stripe_head {
struct dev_stripe_state block_stripe;
struct dev_stripe_state parity_stripe;
- struct open_buckets blocks;
- struct open_buckets parity;
-
struct ec_stripe_new *s;
};
@@ -139,7 +142,7 @@ void bch2_ec_bucket_cancel(struct bch_fs *, struct open_bucket *);
int bch2_ec_stripe_new_alloc(struct bch_fs *, struct ec_stripe_head *);
-void bch2_ec_stripe_head_put(struct ec_stripe_head *);
+void bch2_ec_stripe_head_put(struct bch_fs *, struct ec_stripe_head *);
struct ec_stripe_head *bch2_ec_stripe_head_get(struct bch_fs *, unsigned,
unsigned, unsigned);
@@ -157,6 +160,9 @@ int bch2_stripes_write(struct bch_fs *, unsigned, bool *);
int bch2_ec_mem_alloc(struct bch_fs *, bool);
+void bch2_stripes_heap_to_text(struct printbuf *, struct bch_fs *);
+void bch2_new_stripes_to_text(struct printbuf *, struct bch_fs *);
+
void bch2_fs_ec_exit(struct bch_fs *);
int bch2_fs_ec_init(struct bch_fs *);