1 #ifndef _BUCKETS_TYPES_H
2 #define _BUCKETS_TYPES_H
4 #include "bcachefs_format.h"
7 #define BUCKET_JOURNAL_SEQ_BITS 16
24 * low bits of journal sequence number when this bucket was most
25 * recently modified: if journal_seq_valid is set, this bucket can't be
26 * reused until the journal sequence number written to disk is >= the
27 * bucket's journal sequence number:
36 struct bucket_mark _mark;
37 const struct bucket_mark mark;
51 struct bch_dev_usage {
52 u64 buckets[BCH_DATA_NR];
55 u64 buckets_unavailable;
57 /* _compressed_ sectors: */
58 u64 sectors[BCH_DATA_NR];
59 u64 sectors_fragmented;
63 /* all fields are in units of 512 byte sectors: */
66 struct bch_fs_usage_summarized {
69 /* fields after online_reserved are cleared/recalculated by gc: */
81 u64 data[BCH_DATA_NR];
83 u64 persistent_reserved;
84 } replicas[BCH_REPLICAS_MAX];
86 u64 buckets[BCH_DATA_NR];
89 struct bch_fs_usage_short {
96 * A reservation for space on disk:
98 struct disk_reservation {
101 unsigned nr_replicas;
104 struct copygc_heap_entry {
110 typedef HEAP(struct copygc_heap_entry) copygc_heap;
112 #endif /* _BUCKETS_TYPES_H */