1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _BUCKETS_TYPES_H
3 #define _BUCKETS_TYPES_H
5 #include "bcachefs_format.h"
8 #define BUCKET_JOURNAL_SEQ_BITS 16
24 * low bits of journal sequence number when this bucket was most
25 * recently modified: if journal_seq_valid is set, this bucket can't be
26 * reused until the journal sequence number written to disk is >= the
27 * bucket's journal sequence number:
36 struct bucket_mark _mark;
37 const struct bucket_mark mark;
62 struct bch_dev_usage {
64 u64 buckets_unavailable;
68 u64 sectors; /* _compressed_ sectors: */
71 * Why do we have this? Isn't it just buckets * bucket_size -
79 /* all fields are in units of 512 byte sectors: */
87 /* XXX: add stats for compression ratio */
95 u64 persistent_reserved[BCH_REPLICAS_MAX];
99 struct bch_fs_usage_online {
101 struct bch_fs_usage u;
104 struct bch_fs_usage_short {
112 * A reservation for space on disk:
114 struct disk_reservation {
117 unsigned nr_replicas;
120 struct copygc_heap_entry {
129 typedef HEAP(struct copygc_heap_entry) copygc_heap;
131 #endif /* _BUCKETS_TYPES_H */