File: ec_format.h

package info (click to toggle)
linux 6.17.9-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,734,892 kB
  • sloc: ansic: 26,684,085; asm: 271,195; sh: 147,401; python: 75,980; makefile: 57,306; perl: 36,943; xml: 19,562; cpp: 5,899; yacc: 4,909; lex: 2,943; awk: 1,556; sed: 29; ruby: 25
file content (43 lines) | stat: -rw-r--r-- 1,103 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _BCACHEFS_EC_FORMAT_H
#define _BCACHEFS_EC_FORMAT_H

struct bch_stripe {
	struct bch_val		v;
	__le16			sectors;
	__u8			algorithm;
	__u8			nr_blocks;
	__u8			nr_redundant;

	__u8			csum_granularity_bits;
	__u8			csum_type;

	/*
	 * XXX: targets should be 16 bits - fix this if we ever do a stripe_v2
	 *
	 * we can manage with this because this only needs to point to a
	 * disk label, not a target:
	 */
	__u8			disk_label;

	/*
	 * Variable length sections:
	 * - Pointers
	 * - Checksums
	 *   2D array of [stripe block/device][csum block], with checksum block
	 *   size given by csum_granularity_bits
	 * - Block sector counts: per-block array of u16s
	 *
	 * XXX:
	 * Either checksums should have come last, or we should have included a
	 * checksum_size field (the size in bytes of the checksum itself, not
	 * the blocksize the checksum covers).
	 *
	 * Currently we aren't able to access the block sector counts if the
	 * checksum type is unknown.
	 */

	struct bch_extent_ptr	ptrs[];
} __packed __aligned(8);

#endif /* _BCACHEFS_EC_FORMAT_H */