]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/ec.h
Update bcachefs sources to 2272c5f5b7 bcachefs: Mark stripe buckets with correct...
[bcachefs-tools-debian] / libbcachefs / ec.h
index 3e2b22c00a3e7adf19f166b1254452c79af001d7..c9e4fb214649540be76af8c9ff4e45a5d76ff68b 100644 (file)
@@ -4,19 +4,20 @@
 
 #include "ec_types.h"
 #include "buckets_types.h"
+#include "extents_types.h"
 
 int bch2_stripe_invalid(const struct bch_fs *, struct bkey_s_c,
-                       int rw, struct printbuf *);
+                       unsigned, struct printbuf *);
 void bch2_stripe_to_text(struct printbuf *, struct bch_fs *,
                         struct bkey_s_c);
 
-#define bch2_bkey_ops_stripe (struct bkey_ops) {       \
+#define bch2_bkey_ops_stripe ((struct bkey_ops) {      \
        .key_invalid    = bch2_stripe_invalid,          \
        .val_to_text    = bch2_stripe_to_text,          \
        .swab           = bch2_ptr_swab,                \
        .trans_trigger  = bch2_trans_mark_stripe,       \
        .atomic_trigger = bch2_mark_stripe,             \
-}
+})
 
 static inline unsigned stripe_csums_per_device(const struct bch_stripe *s)
 {
@@ -147,6 +148,10 @@ struct ec_stripe_new {
        struct ec_stripe_head   *h;
        struct mutex            lock;
        struct list_head        list;
+
+       struct hlist_node       hash;
+       u64                     idx;
+
        struct closure          iodone;
 
        /* counts in flight writes, stripe is created when pin == 0 */
@@ -199,19 +204,19 @@ 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 bch_fs *, struct ec_stripe_head *);
-struct ec_stripe_head *bch2_ec_stripe_head_get(struct bch_fs *,
+struct ec_stripe_head *bch2_ec_stripe_head_get(struct btree_trans *,
                        unsigned, unsigned, unsigned, bool, struct closure *);
 
 void bch2_stripes_heap_update(struct bch_fs *, struct stripe *, size_t);
 void bch2_stripes_heap_del(struct bch_fs *, struct stripe *, size_t);
 void bch2_stripes_heap_insert(struct bch_fs *, struct stripe *, size_t);
 
+void bch2_do_stripe_deletes(struct bch_fs *);
+
 void bch2_ec_stop_dev(struct bch_fs *, struct bch_dev *);
 
 void bch2_ec_flush_new_stripes(struct bch_fs *);
 
-void bch2_stripes_heap_start(struct bch_fs *);
-
 int bch2_stripes_read(struct bch_fs *);
 
 void bch2_stripes_heap_to_text(struct printbuf *, struct bch_fs *);