]> www.infradead.org Git - nvme.git/commitdiff
bcachefs: ec_format.h
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 21 Jan 2024 07:47:14 +0000 (02:47 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 21 Jan 2024 18:27:11 +0000 (13:27 -0500)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/bcachefs_format.h
fs/bcachefs/ec_format.h [new file with mode: 0644]

index 6e4fc27ffb3bda034b565f67ef69aaffb09fd7ee..5327514d96f9f10017edff396d5f7b63a2eb341e 100644 (file)
@@ -720,22 +720,6 @@ struct bch_backpointer {
        struct bpos             pos;
 } __packed __aligned(8);
 
-/* Erasure coding */
-
-struct bch_stripe {
-       struct bch_val          v;
-       __le16                  sectors;
-       __u8                    algorithm;
-       __u8                    nr_blocks;
-       __u8                    nr_redundant;
-
-       __u8                    csum_granularity_bits;
-       __u8                    csum_type;
-       __u8                    pad;
-
-       struct bch_extent_ptr   ptrs[];
-} __packed __aligned(8);
-
 /* Reflink: */
 
 struct bch_reflink_p {
@@ -835,6 +819,7 @@ struct bch_sb_field {
        x(downgrade,                    14)
 
 #include "alloc_background_format.h"
+#include "ec_format.h"
 #include "inode_format.h"
 #include "dirent_format.h"
 #include "xattr_format.h"
diff --git a/fs/bcachefs/ec_format.h b/fs/bcachefs/ec_format.h
new file mode 100644 (file)
index 0000000..44ce88b
--- /dev/null
@@ -0,0 +1,19 @@
+/* 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;
+       __u8                    pad;
+
+       struct bch_extent_ptr   ptrs[];
+} __packed __aligned(8);
+
+#endif /* _BCACHEFS_EC_FORMAT_H */