]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/buckets_types.h
New upstream snapshot
[bcachefs-tools-debian] / libbcachefs / buckets_types.h
index d6057d22b18e5b14e4bf56a194bb48d7d4953b37..588b1a72adaec00ddc17b24df784b6540a7935b1 100644 (file)
@@ -37,11 +37,12 @@ struct bucket {
                const struct bucket_mark mark;
        };
 
-       u16                             io_time[2];
+       u64                             io_time[2];
        u8                              oldest_gen;
        u8                              gc_gen;
        unsigned                        gen_valid:1;
-       u8                              ec_redundancy;
+       u8                              stripe_redundancy;
+       u32                             stripe;
 };
 
 struct bucket_array {
@@ -52,26 +53,18 @@ struct bucket_array {
 };
 
 struct bch_dev_usage {
-       u64                     buckets[BCH_DATA_NR];
-       u64                     buckets_alloc;
+       u64                     buckets_ec;
        u64                     buckets_unavailable;
 
-       /* _compressed_ sectors: */
-       u64                     sectors[BCH_DATA_NR];
-       u64                     sectors_fragmented;
-
-       u64                     buckets_ec;
-       u64                     sectors_ec;
+       struct {
+               u64             buckets;
+               u64             sectors; /* _compressed_ sectors: */
+               u64             fragmented;
+       }                       d[BCH_DATA_NR];
 };
 
 struct bch_fs_usage {
        /* all fields are in units of 512 byte sectors: */
-
-       u64                     online_reserved;
-
-       /* fields after online_reserved are cleared/recalculated by gc: */
-       u64                     gc_start[0];
-
        u64                     hidden;
        u64                     btree;
        u64                     data;
@@ -91,6 +84,11 @@ struct bch_fs_usage {
        u64                     replicas[];
 };
 
+struct bch_fs_usage_online {
+       u64                     online_reserved;
+       struct bch_fs_usage     u;
+};
+
 struct bch_fs_usage_short {
        u64                     capacity;
        u64                     used;
@@ -98,22 +96,6 @@ struct bch_fs_usage_short {
        u64                     nr_inodes;
 };
 
-struct replicas_delta {
-       s64                     delta;
-       struct bch_replicas_entry 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[0];
-};
-
 /*
  * A reservation for space on disk:
  */