]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/ec.h
rust: Fix ptr casting in Fs::open()
[bcachefs-tools-debian] / libbcachefs / ec.h
index d47da7d86fe7d4162a21cb85405c90da43c36971..56d1b5e7d79733ada4b36192de92146fd8530da3 100644 (file)
@@ -148,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 */
@@ -177,7 +181,7 @@ struct ec_stripe_head {
        unsigned                target;
        unsigned                algo;
        unsigned                redundancy;
-       bool                    copygc;
+       enum alloc_reserve      reserve;
 
        struct bch_devs_mask    devs;
        unsigned                nr_active_devs;
@@ -200,8 +204,9 @@ 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 *,
-                       unsigned, unsigned, unsigned, bool, struct closure *);
+struct ec_stripe_head *bch2_ec_stripe_head_get(struct btree_trans *,
+                       unsigned, unsigned, unsigned,
+                       enum alloc_reserve, 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);
@@ -213,8 +218,6 @@ 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 *);