]> git.sesse.net Git - bcachefs-tools-debian/blob - libbcachefs/extents_types.h
Update bcachefs sources to da7fefde29 bcachefs: shim for userspace raid library
[bcachefs-tools-debian] / libbcachefs / extents_types.h
1 #ifndef _BCACHEFS_EXTENTS_TYPES_H
2 #define _BCACHEFS_EXTENTS_TYPES_H
3
4 #include "bcachefs_format.h"
5
6 struct bch_extent_crc_unpacked {
7         u8                      csum_type;
8         u8                      compression_type;
9
10         u16                     compressed_size;
11         u16                     uncompressed_size;
12
13         u16                     offset;
14         u16                     live_size;
15
16         u16                     nonce;
17
18         struct bch_csum         csum;
19 };
20
21 struct extent_ptr_decoded {
22         unsigned                        idx;
23         unsigned                        ec_nr;
24         struct bch_extent_crc_unpacked  crc;
25         struct bch_extent_ptr           ptr;
26         struct bch_extent_stripe_ptr    ec[4];
27 };
28
29 struct bch_io_failures {
30         u8                      nr;
31         struct bch_dev_io_failures {
32                 u8              dev;
33                 u8              idx;
34                 u8              nr_failed;
35                 u8              nr_retries;
36         }                       devs[BCH_REPLICAS_MAX];
37 };
38
39 #endif /* _BCACHEFS_EXTENTS_TYPES_H */