summaryrefslogtreecommitdiff
path: root/libbcachefs/quota.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2018-02-16 15:36:33 -0500
committerKent Overstreet <kent.overstreet@gmail.com>2018-02-16 18:13:24 -0500
commit807abf36c1e119825d42cda6f6b249649ca44eb5 (patch)
tree59228cffd1e9b60d822e7381b897df8036788ffe /libbcachefs/quota.h
parent8d95f4a437a2a4a5f8a18be00d8d74dcc4767f51 (diff)
Update bcachefs sources to e99d29e402 bcachefs: zstd support, compression refactoring
Diffstat (limited to 'libbcachefs/quota.h')
-rw-r--r--libbcachefs/quota.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libbcachefs/quota.h b/libbcachefs/quota.h
index b5536be9..509b7f0e 100644
--- a/libbcachefs/quota.h
+++ b/libbcachefs/quota.h
@@ -20,6 +20,13 @@ static inline struct bch_qid bch_qid(struct bch_inode_unpacked *u)
};
}
+static inline unsigned enabled_qtypes(struct bch_fs *c)
+{
+ return ((c->opts.usrquota << QTYP_USR)|
+ (c->opts.grpquota << QTYP_GRP)|
+ (c->opts.prjquota << QTYP_PRJ));
+}
+
#ifdef CONFIG_BCACHEFS_QUOTA
int bch2_quota_acct(struct bch_fs *, struct bch_qid, enum quota_counters,