Skip to content

Commit a4e11ce

Browse files
author
Kent Overstreet
committed
bcachefs: Document issue with bch_stripe layout
We've got a problem with bch_stripe that is going to take an on disk format rev to fix - we can't access the block sector counts if the checksum type is unknown. Document it for now, there are a few other things to fix as well. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
1 parent 78423de commit a4e11ce

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

fs/bcachefs/ec_format.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,23 @@ struct bch_stripe {
2020
*/
2121
__u8 disk_label;
2222

23+
/*
24+
* Variable length sections:
25+
* - Pointers
26+
* - Checksums
27+
* 2D array of [stripe block/device][csum block], with checksum block
28+
* size given by csum_granularity_bits
29+
* - Block sector counts: per-block array of u16s
30+
*
31+
* XXX:
32+
* Either checksums should have come last, or we should have included a
33+
* checksum_size field (the size in bytes of the checksum itself, not
34+
* the blocksize the checksum covers).
35+
*
36+
* Currently we aren't able to access the block sector counts if the
37+
* checksum type is unknown.
38+
*/
39+
2340
struct bch_extent_ptr ptrs[];
2441
} __packed __aligned(8);
2542

0 commit comments

Comments
 (0)