mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 18:13:04 +00:00
fa85c47397
When reshaping existing stripes, we should keep them on the same target that they were allocated on; to do this, we need to add a field to the btree stripe type. This is a tad awkward, because we only have 8 bits left, and targets are 16 bits - but we only need to store a label, not a full target. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
27 lines
565 B
C
27 lines
565 B
C
/* 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;
|
|
|
|
struct bch_extent_ptr ptrs[];
|
|
} __packed __aligned(8);
|
|
|
|
#endif /* _BCACHEFS_EC_FORMAT_H */
|