summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/quota.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2018-12-17 05:43:00 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:13 -0400
commit0f5254aa98befa5187cc4d02584ab0f19d18ff68 (patch)
treef216065b3dd82d6f1f0d84d61e2a02b95dd5ebd8 /fs/bcachefs/quota.h
parentd42dd4ad6d7e15a7742ed008d1be3c37247547c9 (diff)
downloadlinux-0f5254aa98befa5187cc4d02584ab0f19d18ff68.tar.gz
linux-0f5254aa98befa5187cc4d02584ab0f19d18ff68.tar.bz2
linux-0f5254aa98befa5187cc4d02584ab0f19d18ff68.zip
bcachefs: bch2_fs_quota_transfer
improve quota transfer locking & make ei_qid usage more consistent Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/quota.h')
-rw-r--r--fs/bcachefs/quota.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/fs/bcachefs/quota.h b/fs/bcachefs/quota.h
index 294a04db84bf..72b5ea0d77c5 100644
--- a/fs/bcachefs/quota.h
+++ b/fs/bcachefs/quota.h
@@ -15,12 +15,6 @@ void bch2_quota_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c);
.val_to_text = bch2_quota_to_text, \
}
-enum quota_acct_mode {
- KEY_TYPE_QUOTA_PREALLOC,
- KEY_TYPE_QUOTA_WARN,
- KEY_TYPE_QUOTA_NOCHECK,
-};
-
static inline struct bch_qid bch_qid(struct bch_inode_unpacked *u)
{
return (struct bch_qid) {
@@ -43,7 +37,7 @@ int bch2_quota_acct(struct bch_fs *, struct bch_qid, enum quota_counters,
s64, enum quota_acct_mode);
int bch2_quota_transfer(struct bch_fs *, unsigned, struct bch_qid,
- struct bch_qid, u64);
+ struct bch_qid, u64, enum quota_acct_mode);
void bch2_fs_quota_exit(struct bch_fs *);
void bch2_fs_quota_init(struct bch_fs *);
@@ -62,7 +56,8 @@ static inline int bch2_quota_acct(struct bch_fs *c, struct bch_qid qid,
static inline int bch2_quota_transfer(struct bch_fs *c, unsigned qtypes,
struct bch_qid dst,
- struct bch_qid src, u64 space)
+ struct bch_qid src, u64 space,
+ enum quota_acct_mode mode)
{
return 0;
}