1 #ifndef _BUCKETS_TYPES_H
2 #define _BUCKETS_TYPES_H
6 enum bucket_data_type {
24 unsigned journal_seq_valid:1;
27 * If this bucket had metadata while at the current generation
28 * number, the allocator must increment its gen before we reuse
31 unsigned had_metadata:1;
33 unsigned owned_by_allocator:1;
43 * low bits of journal sequence number when this bucket was most
44 * recently modified: if journal_seq_valid is set, this bucket
45 * can't be reused until the journal sequence number written to
46 * disk is >= the bucket's journal sequence number:
57 struct bucket_mark _mark;
58 const struct bucket_mark mark;
75 struct bch_dev_usage {
81 u64 sectors[S_ALLOC_NR];
85 /* all fields are in units of 512 byte sectors: */
86 u64 s[S_COMPRESSED_NR][S_ALLOC_NR];
87 u64 persistent_reserved;
92 struct bucket_heap_entry {
94 struct bucket_mark mark;
97 typedef HEAP(struct bucket_heap_entry) bucket_heap;
100 * A reservation for space on disk:
102 struct disk_reservation {
105 unsigned nr_replicas;
108 #endif /* _BUCKETS_TYPES_H */