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:
56 struct bucket_mark _mark;
57 const struct bucket_mark mark;
74 struct bch_dev_usage {
80 u64 sectors[S_ALLOC_NR];
84 /* all fields are in units of 512 byte sectors: */
85 u64 s[S_COMPRESSED_NR][S_ALLOC_NR];
86 u64 persistent_reserved;
91 struct bucket_heap_entry {
93 struct bucket_mark mark;
96 typedef HEAP(struct bucket_heap_entry) bucket_heap;
99 * A reservation for space on disk:
101 struct disk_reservation {
104 unsigned nr_replicas;
107 #endif /* _BUCKETS_TYPES_H */