1 #ifndef _BUCKETS_TYPES_H
2 #define _BUCKETS_TYPES_H
6 enum bucket_data_type {
23 unsigned journal_seq_valid:1;
26 * If this bucket had metadata while at the current generation
27 * number, the allocator must increment its gen before we reuse
30 unsigned had_metadata:1;
32 unsigned owned_by_allocator:1;
42 * low bits of journal sequence number when this bucket was most
43 * recently modified: if journal_seq_valid is set, this bucket
44 * can't be reused until the journal sequence number written to
45 * disk is >= the bucket's journal sequence number:
62 struct bucket_mark _mark;
63 const struct bucket_mark mark;
80 struct bch_dev_usage {
86 u64 sectors[S_ALLOC_NR];
90 /* all fields are in units of 512 byte sectors: */
91 u64 s[S_COMPRESSED_NR][S_ALLOC_NR];
92 u64 persistent_reserved;
97 struct bucket_heap_entry {
99 struct bucket_mark mark;
102 typedef HEAP(struct bucket_heap_entry) bucket_heap;
105 * A reservation for space on disk:
107 struct disk_reservation {
110 unsigned nr_replicas;
113 #endif /* _BUCKETS_TYPES_H */