]> git.sesse.net Git - bcachefs-tools-debian/blob - libbcachefs/quota_types.h
Update bcachefs sources to 02ae70070a bcachefs: Allocate new btree roots lazily
[bcachefs-tools-debian] / libbcachefs / quota_types.h
1 #ifndef _BCACHEFS_QUOTA_TYPES_H
2 #define _BCACHEFS_QUOTA_TYPES_H
3
4 #include <linux/generic-radix-tree.h>
5
6 struct bch_qid {
7         u32             q[QTYP_NR];
8 };
9
10 struct memquota_counter {
11         u64                             v;
12         u64                             hardlimit;
13         u64                             softlimit;
14         s64                             timer;
15         int                             warns;
16         int                             warning_issued;
17 };
18
19 struct bch_memquota {
20         struct memquota_counter         c[Q_COUNTERS];
21 };
22
23 typedef GENRADIX(struct bch_memquota)   bch_memquota_table;
24
25 struct quota_limit {
26         u32                             timelimit;
27         u32                             warnlimit;
28 };
29
30 struct bch_memquota_type {
31         struct quota_limit              limits[Q_COUNTERS];
32         bch_memquota_table              table;
33         struct mutex                    lock;
34 };
35
36 #endif /* _BCACHEFS_QUOTA_TYPES_H */