]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/ec.h
Move c_src dirs back to toplevel
[bcachefs-tools-debian] / libbcachefs / ec.h
index 1b1848e5fa5e78facd340cf194264f575c2952b0..f4369b02e805f0a24572a8cf87d18867c3d3301a 100644 (file)
@@ -8,17 +8,18 @@
 
 enum bkey_invalid_flags;
 
-int bch2_stripe_invalid(const struct bch_fs *, struct bkey_s_c,
+int bch2_stripe_invalid(struct bch_fs *, struct bkey_s_c,
                        enum bkey_invalid_flags, struct printbuf *);
 void bch2_stripe_to_text(struct printbuf *, struct bch_fs *,
                         struct bkey_s_c);
+int bch2_trigger_stripe(struct btree_trans *, enum btree_id, unsigned,
+                       struct bkey_s_c, struct bkey_s, unsigned);
 
 #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,             \
+       .trigger        = bch2_trigger_stripe,          \
        .min_val_size   = 8,                            \
 })
 
@@ -138,10 +139,7 @@ struct ec_stripe_buf {
 
        void                    *data[BCH_BKEY_PTRS_MAX];
 
-       union {
-               struct bkey_i_stripe    key;
-               u64                     pad[255];
-       };
+       __BKEY_PADDED(key, 255);
 };
 
 struct ec_stripe_head;
@@ -202,7 +200,7 @@ struct ec_stripe_head {
        struct ec_stripe_new    *s;
 };
 
-int bch2_ec_read_extent(struct bch_fs *, struct bch_read_bio *);
+int bch2_ec_read_extent(struct btree_trans *, struct bch_read_bio *);
 
 void *bch2_writepoint_ec_buf(struct bch_fs *, struct write_point *);
 
@@ -243,7 +241,7 @@ static inline void ec_stripe_new_put(struct bch_fs *c, struct ec_stripe_new *s,
                        bch2_ec_do_stripe_creates(c);
                        break;
                default:
-                       unreachable();
+                       BUG();
                }
 }