1 #ifndef _BUCKETS_TYPES_H
2 #define _BUCKETS_TYPES_H
4 #include "bcachefs_format.h"
7 #define BUCKET_JOURNAL_SEQ_BITS 16
26 * low bits of journal sequence number when this bucket was most
27 * recently modified: if journal_seq_valid is set, this bucket
28 * can't be reused until the journal sequence number written to
29 * disk is >= the bucket's journal sequence number:
38 struct bucket_mark _mark;
39 const struct bucket_mark mark;
52 struct bch_dev_usage {
53 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: */
68 u64 data[BCH_DATA_NR];
69 u64 persistent_reserved;
70 } replicas[BCH_REPLICAS_MAX];
72 u64 buckets[BCH_DATA_NR];
76 * A reservation for space on disk:
78 struct disk_reservation {
84 struct copygc_heap_entry {
90 typedef HEAP(struct copygc_heap_entry) copygc_heap;
92 #endif /* _BUCKETS_TYPES_H */