]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - c_src/libbcachefs/replicas_types.h
move Rust sources to top level, C sources into c_src
[bcachefs-tools-debian] / c_src / libbcachefs / replicas_types.h
diff --git a/c_src/libbcachefs/replicas_types.h b/c_src/libbcachefs/replicas_types.h
new file mode 100644 (file)
index 0000000..ac90d14
--- /dev/null
@@ -0,0 +1,27 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _BCACHEFS_REPLICAS_TYPES_H
+#define _BCACHEFS_REPLICAS_TYPES_H
+
+struct bch_replicas_cpu {
+       unsigned                nr;
+       unsigned                entry_size;
+       struct bch_replicas_entry_v1 *entries;
+};
+
+struct replicas_delta {
+       s64                     delta;
+       struct bch_replicas_entry_v1 r;
+} __packed;
+
+struct replicas_delta_list {
+       unsigned                size;
+       unsigned                used;
+
+       struct                  {} memset_start;
+       u64                     nr_inodes;
+       u64                     persistent_reserved[BCH_REPLICAS_MAX];
+       struct                  {} memset_end;
+       struct replicas_delta   d[];
+};
+
+#endif /* _BCACHEFS_REPLICAS_TYPES_H */