1 #ifndef _BUCKETS_TYPES_H
2 #define _BUCKETS_TYPES_H
4 enum bucket_data_type {
21 /* generation copygc is going to move this bucket into */
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:
63 struct bucket_mark _mark;
64 const struct bucket_mark mark;
81 struct bch_dev_usage {
87 u64 sectors[S_ALLOC_NR];
91 /* all fields are in units of 512 byte sectors: */
92 u64 s[S_COMPRESSED_NR][S_ALLOC_NR];
93 u64 persistent_reserved;
98 struct bucket_heap_entry {
104 * A reservation for space on disk:
106 struct disk_reservation {
109 unsigned nr_replicas;
112 #endif /* _BUCKETS_TYPES_H */