X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libbcachefs%2Fec_types.h;h=e2b02a82de321bb4612e79eb1034ed997e7f3f0f;hb=87179c7a6e2a210ea57951d444a3055e883d08fa;hp=e4d633fca5bf913a78a4d78168141dc1458fdaf1;hpb=da730dc67c1bd10842c49a1534fe23e0d8fdb4be;p=bcachefs-tools-debian diff --git a/libbcachefs/ec_types.h b/libbcachefs/ec_types.h index e4d633f..e2b02a8 100644 --- a/libbcachefs/ec_types.h +++ b/libbcachefs/ec_types.h @@ -2,29 +2,31 @@ #ifndef _BCACHEFS_EC_TYPES_H #define _BCACHEFS_EC_TYPES_H -#include - -#define EC_STRIPE_MAX 16 +#include "bcachefs_format.h" struct bch_replicas_padded { struct bch_replicas_entry e; - u8 pad[EC_STRIPE_MAX]; + u8 pad[BCH_BKEY_PTRS_MAX]; }; struct stripe { size_t heap_idx; - u16 sectors; u8 algorithm; + u8 nr_blocks; + u8 nr_redundant; + u8 blocks_nonempty; +}; + +struct gc_stripe { + u16 sectors; u8 nr_blocks; u8 nr_redundant; - unsigned alive:1; - unsigned dirty:1; - unsigned on_heap:1; - u8 blocks_nonempty; - u16 block_sectors[EC_STRIPE_MAX]; + unsigned alive:1; /* does a corresponding key exist in stripes btree? */ + u16 block_sectors[BCH_BKEY_PTRS_MAX]; + struct bch_extent_ptr ptrs[BCH_BKEY_PTRS_MAX]; struct bch_replicas_padded r; };