mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-12-08 00:00:12 +03:00
Some checks are pending
build / bcachefs-tools-deb (ubuntu-22.04) (push) Waiting to run
build / bcachefs-tools-deb (ubuntu-24.04) (push) Waiting to run
build / bcachefs-tools-rpm (push) Waiting to run
build / bcachefs-tools-msrv (push) Waiting to run
Nix Flake actions / nix-matrix (push) Waiting to run
Nix Flake actions / ${{ matrix.name }} (${{ matrix.system }}) (push) Blocked by required conditions
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
36 lines
756 B
C
36 lines
756 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _BCACHEFS_EC_TYPES_H
|
|
#define _BCACHEFS_EC_TYPES_H
|
|
|
|
#include "bcachefs_format.h"
|
|
|
|
union bch_replicas_padded {
|
|
u8 bytes[struct_size_t(struct bch_replicas_entry_v1,
|
|
devs, BCH_BKEY_PTRS_MAX)];
|
|
struct bch_replicas_entry_v1 e;
|
|
};
|
|
|
|
struct stripe {
|
|
size_t heap_idx;
|
|
u16 sectors;
|
|
u8 algorithm;
|
|
u8 nr_blocks;
|
|
u8 nr_redundant;
|
|
u8 blocks_nonempty;
|
|
u8 disk_label;
|
|
};
|
|
|
|
struct gc_stripe {
|
|
u8 lock;
|
|
unsigned alive:1; /* does a corresponding key exist in stripes btree? */
|
|
u16 sectors;
|
|
u8 nr_blocks;
|
|
u8 nr_redundant;
|
|
u16 block_sectors[BCH_BKEY_PTRS_MAX];
|
|
struct bch_extent_ptr ptrs[BCH_BKEY_PTRS_MAX];
|
|
|
|
union bch_replicas_padded r;
|
|
};
|
|
|
|
#endif /* _BCACHEFS_EC_TYPES_H */
|