2019-07-10 23:12:15 +03:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
2017-12-14 00:01:18 +03:00
|
|
|
#ifndef _BCACHEFS_EXTENTS_TYPES_H
|
|
|
|
#define _BCACHEFS_EXTENTS_TYPES_H
|
|
|
|
|
|
|
|
#include "bcachefs_format.h"
|
|
|
|
|
|
|
|
struct bch_extent_crc_unpacked {
|
2018-12-12 14:21:55 +03:00
|
|
|
u32 compressed_size;
|
|
|
|
u32 uncompressed_size;
|
|
|
|
u32 live_size;
|
|
|
|
|
2017-12-14 00:01:18 +03:00
|
|
|
u8 csum_type;
|
|
|
|
u8 compression_type;
|
|
|
|
|
|
|
|
u16 offset;
|
|
|
|
|
|
|
|
u16 nonce;
|
|
|
|
|
|
|
|
struct bch_csum csum;
|
|
|
|
};
|
|
|
|
|
2018-11-04 03:11:29 +03:00
|
|
|
struct extent_ptr_decoded {
|
2018-11-23 11:04:34 +03:00
|
|
|
unsigned idx;
|
2019-10-11 01:04:36 +03:00
|
|
|
bool has_ec;
|
2017-12-14 00:01:18 +03:00
|
|
|
struct bch_extent_crc_unpacked crc;
|
2018-11-04 03:11:29 +03:00
|
|
|
struct bch_extent_ptr ptr;
|
2019-10-11 01:04:36 +03:00
|
|
|
struct bch_extent_stripe_ptr ec;
|
2018-11-04 03:11:29 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
struct bch_io_failures {
|
|
|
|
u8 nr;
|
|
|
|
struct bch_dev_io_failures {
|
|
|
|
u8 dev;
|
2018-11-23 11:04:34 +03:00
|
|
|
u8 idx;
|
2018-11-04 03:11:29 +03:00
|
|
|
u8 nr_failed;
|
|
|
|
u8 nr_retries;
|
|
|
|
} devs[BCH_REPLICAS_MAX];
|
2017-12-14 00:01:18 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* _BCACHEFS_EXTENTS_TYPES_H */
|