]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/quota.h
Update bcachefs sources to 62de7539dc bcachefs: Make bkey types globally unique
[bcachefs-tools-debian] / libbcachefs / quota.h
index 509b7f0e069d0f33423f72f70fa5c7b05603b0cf..0c3eb6973de1e8eed3b00fca671d40b6816368dd 100644 (file)
@@ -1,14 +1,23 @@
 #ifndef _BCACHEFS_QUOTA_H
 #define _BCACHEFS_QUOTA_H
 
+#include "inode.h"
 #include "quota_types.h"
 
-extern const struct bkey_ops bch2_bkey_quota_ops;
+extern const struct bch_sb_field_ops bch_sb_field_ops_quota;
+
+const char *bch2_quota_invalid(const struct bch_fs *, struct bkey_s_c);
+void bch2_quota_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c);
+
+#define bch2_bkey_ops_quota (struct bkey_ops) {                \
+       .key_invalid    = bch2_quota_invalid,           \
+       .val_to_text    = bch2_quota_to_text,           \
+}
 
 enum quota_acct_mode {
-       BCH_QUOTA_PREALLOC,
-       BCH_QUOTA_WARN,
-       BCH_QUOTA_NOCHECK,
+       KEY_TYPE_QUOTA_PREALLOC,
+       KEY_TYPE_QUOTA_WARN,
+       KEY_TYPE_QUOTA_NOCHECK,
 };
 
 static inline struct bch_qid bch_qid(struct bch_inode_unpacked *u)