1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _BCACHEFS_EXTENTS_TYPES_H
3#define _BCACHEFS_EXTENTS_TYPES_H
4
5#include "bcachefs_format.h"
6
7struct bch_extent_crc_unpacked {
8 u32 compressed_size;
9 u32 uncompressed_size;
10 u32 live_size;
11
12 u8 csum_type;
13 u8 compression_type;
14
15 u16 offset;
16
17 u16 nonce;
18
19 struct bch_csum csum;
20};
21
22struct extent_ptr_decoded {
23 unsigned idx;
24 bool has_ec;
25 struct bch_extent_crc_unpacked crc;
26 struct bch_extent_ptr ptr;
27 struct bch_extent_stripe_ptr ec;
28};
29
30struct bch_io_failures {
31 u8 nr;
32 struct bch_dev_io_failures {
33 u8 dev;
34 u8 idx;
35 u8 nr_failed;
36 u8 nr_retries;
37 } devs[BCH_REPLICAS_MAX];
38};
39
40#endif /* _BCACHEFS_EXTENTS_TYPES_H */
41

source code of linux/fs/bcachefs/extents_types.h