]> www.infradead.org Git - users/willy/pagecache.git/commitdiff
bcachefs: Document issue with bch_stripe layout
authorKent Overstreet <kent.overstreet@linux.dev>
Mon, 13 Jan 2025 20:41:50 +0000 (15:41 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Tue, 14 Jan 2025 15:45:31 +0000 (10:45 -0500)
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>
fs/bcachefs/ec_format.h

index 64ef52e000784ddc780301ab478832c73489b0af..b9770f24f213c1efb50d66af323ba3539e2bc01e 100644 (file)
@@ -20,6 +20,23 @@ struct bch_stripe {
         */
        __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);