1 // SPDX-License-Identifier: GPL-2.0
3 #include "btree_update.h"
9 static const char * const bch2_quota_types[] = {
15 static const char * const bch2_quota_counters[] = {
20 static int bch2_sb_quota_validate(struct bch_sb *sb, struct bch_sb_field *f,
23 struct bch_sb_field_quota *q = field_to_type(f, quota);
25 if (vstruct_bytes(&q->field) < sizeof(*q)) {
26 prt_printf(err, "wrong size (got %zu should be %zu)",
27 vstruct_bytes(&q->field), sizeof(*q));
34 static void bch2_sb_quota_to_text(struct printbuf *out, struct bch_sb *sb,
35 struct bch_sb_field *f)
37 struct bch_sb_field_quota *q = field_to_type(f, quota);
38 unsigned qtyp, counter;
40 for (qtyp = 0; qtyp < ARRAY_SIZE(q->q); qtyp++) {
41 prt_printf(out, "%s: flags %llx",
42 bch2_quota_types[qtyp],
43 le64_to_cpu(q->q[qtyp].flags));
45 for (counter = 0; counter < Q_COUNTERS; counter++)
46 prt_printf(out, " %s timelimit %u warnlimit %u",
47 bch2_quota_counters[counter],
48 le32_to_cpu(q->q[qtyp].c[counter].timelimit),
49 le32_to_cpu(q->q[qtyp].c[counter].warnlimit));
55 const struct bch_sb_field_ops bch_sb_field_ops_quota = {
56 .validate = bch2_sb_quota_validate,
57 .to_text = bch2_sb_quota_to_text,
60 int bch2_quota_invalid(const struct bch_fs *c, struct bkey_s_c k,
61 int rw, struct printbuf *err)
63 if (k.k->p.inode >= QTYP_NR) {
64 prt_printf(err, "invalid quota type (%llu >= %u)",
65 k.k->p.inode, QTYP_NR);
69 if (bkey_val_bytes(k.k) != sizeof(struct bch_quota)) {
70 prt_printf(err, "incorrect value size (%zu != %zu)",
71 bkey_val_bytes(k.k), sizeof(struct bch_quota));
78 void bch2_quota_to_text(struct printbuf *out, struct bch_fs *c,
81 struct bkey_s_c_quota dq = bkey_s_c_to_quota(k);
84 for (i = 0; i < Q_COUNTERS; i++)
85 prt_printf(out, "%s hardlimit %llu softlimit %llu",
86 bch2_quota_counters[i],
87 le64_to_cpu(dq.v->c[i].hardlimit),
88 le64_to_cpu(dq.v->c[i].softlimit));
91 #ifdef CONFIG_BCACHEFS_QUOTA
93 #include <linux/cred.h>
95 #include <linux/quota.h>
97 static inline unsigned __next_qtype(unsigned i, unsigned qtypes)
100 return qtypes ? i + __ffs(qtypes) : QTYP_NR;
103 #define for_each_set_qtype(_c, _i, _q, _qtypes) \
105 (_i = __next_qtype(_i, _qtypes), \
106 _q = &(_c)->quotas[_i], \
110 static bool ignore_hardlimit(struct bch_memquota_type *q)
112 if (capable(CAP_SYS_RESOURCE))
115 struct mem_dqinfo *info = &sb_dqopt(dquot->dq_sb)->info[dquot->dq_id.type];
117 return capable(CAP_SYS_RESOURCE) &&
118 (info->dqi_format->qf_fmt_id != QFMT_VFS_OLD ||
119 !(info->dqi_flags & DQF_ROOT_SQUASH));
125 SOFTWARN, /* Softlimit reached */
126 SOFTLONGWARN, /* Grace time expired */
127 HARDWARN, /* Hardlimit reached */
129 HARDBELOW, /* Usage got below inode hardlimit */
130 SOFTBELOW, /* Usage got below inode softlimit */
133 static int quota_nl[][Q_COUNTERS] = {
134 [HARDWARN][Q_SPC] = QUOTA_NL_BHARDWARN,
135 [SOFTLONGWARN][Q_SPC] = QUOTA_NL_BSOFTLONGWARN,
136 [SOFTWARN][Q_SPC] = QUOTA_NL_BSOFTWARN,
137 [HARDBELOW][Q_SPC] = QUOTA_NL_BHARDBELOW,
138 [SOFTBELOW][Q_SPC] = QUOTA_NL_BSOFTBELOW,
140 [HARDWARN][Q_INO] = QUOTA_NL_IHARDWARN,
141 [SOFTLONGWARN][Q_INO] = QUOTA_NL_ISOFTLONGWARN,
142 [SOFTWARN][Q_INO] = QUOTA_NL_ISOFTWARN,
143 [HARDBELOW][Q_INO] = QUOTA_NL_IHARDBELOW,
144 [SOFTBELOW][Q_INO] = QUOTA_NL_ISOFTBELOW,
152 } m[QTYP_NR * Q_COUNTERS];
155 static void prepare_msg(unsigned qtype,
156 enum quota_counters counter,
157 struct quota_msgs *msgs,
158 enum quota_msg msg_type)
160 BUG_ON(msgs->nr >= ARRAY_SIZE(msgs->m));
162 msgs->m[msgs->nr].qtype = qtype;
163 msgs->m[msgs->nr].msg = quota_nl[msg_type][counter];
167 static void prepare_warning(struct memquota_counter *qc,
169 enum quota_counters counter,
170 struct quota_msgs *msgs,
171 enum quota_msg msg_type)
173 if (qc->warning_issued & (1 << msg_type))
176 prepare_msg(qtype, counter, msgs, msg_type);
179 static void flush_warnings(struct bch_qid qid,
180 struct super_block *sb,
181 struct quota_msgs *msgs)
185 for (i = 0; i < msgs->nr; i++)
186 quota_send_warning(make_kqid(&init_user_ns, msgs->m[i].qtype, qid.q[i]),
187 sb->s_dev, msgs->m[i].msg);
190 static int bch2_quota_check_limit(struct bch_fs *c,
192 struct bch_memquota *mq,
193 struct quota_msgs *msgs,
194 enum quota_counters counter,
196 enum quota_acct_mode mode)
198 struct bch_memquota_type *q = &c->quotas[qtype];
199 struct memquota_counter *qc = &mq->c[counter];
204 if (mode == KEY_TYPE_QUOTA_NOCHECK)
208 if (n < qc->hardlimit &&
209 (qc->warning_issued & (1 << HARDWARN))) {
210 qc->warning_issued &= ~(1 << HARDWARN);
211 prepare_msg(qtype, counter, msgs, HARDBELOW);
214 if (n < qc->softlimit &&
215 (qc->warning_issued & (1 << SOFTWARN))) {
216 qc->warning_issued &= ~(1 << SOFTWARN);
217 prepare_msg(qtype, counter, msgs, SOFTBELOW);
220 qc->warning_issued = 0;
226 !ignore_hardlimit(q)) {
227 if (mode == KEY_TYPE_QUOTA_PREALLOC)
230 prepare_warning(qc, qtype, counter, msgs, HARDWARN);
236 ktime_get_real_seconds() >= qc->timer &&
237 !ignore_hardlimit(q)) {
238 if (mode == KEY_TYPE_QUOTA_PREALLOC)
241 prepare_warning(qc, qtype, counter, msgs, SOFTLONGWARN);
247 if (mode == KEY_TYPE_QUOTA_PREALLOC)
250 prepare_warning(qc, qtype, counter, msgs, SOFTWARN);
252 /* XXX is this the right one? */
253 qc->timer = ktime_get_real_seconds() +
254 q->limits[counter].warnlimit;
260 int bch2_quota_acct(struct bch_fs *c, struct bch_qid qid,
261 enum quota_counters counter, s64 v,
262 enum quota_acct_mode mode)
264 unsigned qtypes = enabled_qtypes(c);
265 struct bch_memquota_type *q;
266 struct bch_memquota *mq[QTYP_NR];
267 struct quota_msgs msgs;
271 memset(&msgs, 0, sizeof(msgs));
273 for_each_set_qtype(c, i, q, qtypes)
274 mutex_lock_nested(&q->lock, i);
276 for_each_set_qtype(c, i, q, qtypes) {
277 mq[i] = genradix_ptr_alloc(&q->table, qid.q[i], GFP_NOFS);
283 ret = bch2_quota_check_limit(c, i, mq[i], &msgs, counter, v, mode);
288 for_each_set_qtype(c, i, q, qtypes)
289 mq[i]->c[counter].v += v;
291 for_each_set_qtype(c, i, q, qtypes)
292 mutex_unlock(&q->lock);
294 flush_warnings(qid, c->vfs_sb, &msgs);
299 static void __bch2_quota_transfer(struct bch_memquota *src_q,
300 struct bch_memquota *dst_q,
301 enum quota_counters counter, s64 v)
303 BUG_ON(v > src_q->c[counter].v);
304 BUG_ON(v + dst_q->c[counter].v < v);
306 src_q->c[counter].v -= v;
307 dst_q->c[counter].v += v;
310 int bch2_quota_transfer(struct bch_fs *c, unsigned qtypes,
312 struct bch_qid src, u64 space,
313 enum quota_acct_mode mode)
315 struct bch_memquota_type *q;
316 struct bch_memquota *src_q[3], *dst_q[3];
317 struct quota_msgs msgs;
321 qtypes &= enabled_qtypes(c);
323 memset(&msgs, 0, sizeof(msgs));
325 for_each_set_qtype(c, i, q, qtypes)
326 mutex_lock_nested(&q->lock, i);
328 for_each_set_qtype(c, i, q, qtypes) {
329 src_q[i] = genradix_ptr_alloc(&q->table, src.q[i], GFP_NOFS);
330 dst_q[i] = genradix_ptr_alloc(&q->table, dst.q[i], GFP_NOFS);
332 if (!src_q[i] || !dst_q[i]) {
337 ret = bch2_quota_check_limit(c, i, dst_q[i], &msgs, Q_SPC,
338 dst_q[i]->c[Q_SPC].v + space,
343 ret = bch2_quota_check_limit(c, i, dst_q[i], &msgs, Q_INO,
344 dst_q[i]->c[Q_INO].v + 1,
350 for_each_set_qtype(c, i, q, qtypes) {
351 __bch2_quota_transfer(src_q[i], dst_q[i], Q_SPC, space);
352 __bch2_quota_transfer(src_q[i], dst_q[i], Q_INO, 1);
356 for_each_set_qtype(c, i, q, qtypes)
357 mutex_unlock(&q->lock);
359 flush_warnings(dst, c->vfs_sb, &msgs);
364 static int __bch2_quota_set(struct bch_fs *c, struct bkey_s_c k)
366 struct bkey_s_c_quota dq;
367 struct bch_memquota_type *q;
368 struct bch_memquota *mq;
371 BUG_ON(k.k->p.inode >= QTYP_NR);
375 dq = bkey_s_c_to_quota(k);
376 q = &c->quotas[k.k->p.inode];
378 mutex_lock(&q->lock);
379 mq = genradix_ptr_alloc(&q->table, k.k->p.offset, GFP_KERNEL);
381 mutex_unlock(&q->lock);
385 for (i = 0; i < Q_COUNTERS; i++) {
386 mq->c[i].hardlimit = le64_to_cpu(dq.v->c[i].hardlimit);
387 mq->c[i].softlimit = le64_to_cpu(dq.v->c[i].softlimit);
390 mutex_unlock(&q->lock);
396 static int bch2_quota_init_type(struct bch_fs *c, enum quota_types type)
398 struct btree_trans trans;
399 struct btree_iter iter;
403 bch2_trans_init(&trans, c, 0, 0);
405 for_each_btree_key(&trans, iter, BTREE_ID_quotas, POS(type, 0),
406 BTREE_ITER_PREFETCH, k, ret) {
407 if (k.k->p.inode != type)
410 ret = __bch2_quota_set(c, k);
414 bch2_trans_iter_exit(&trans, &iter);
416 bch2_trans_exit(&trans);
420 void bch2_fs_quota_exit(struct bch_fs *c)
424 for (i = 0; i < ARRAY_SIZE(c->quotas); i++)
425 genradix_free(&c->quotas[i].table);
428 void bch2_fs_quota_init(struct bch_fs *c)
432 for (i = 0; i < ARRAY_SIZE(c->quotas); i++)
433 mutex_init(&c->quotas[i].lock);
436 static void bch2_sb_quota_read(struct bch_fs *c)
438 struct bch_sb_field_quota *sb_quota;
441 sb_quota = bch2_sb_get_quota(c->disk_sb.sb);
445 for (i = 0; i < QTYP_NR; i++) {
446 struct bch_memquota_type *q = &c->quotas[i];
448 for (j = 0; j < Q_COUNTERS; j++) {
449 q->limits[j].timelimit =
450 le32_to_cpu(sb_quota->q[i].c[j].timelimit);
451 q->limits[j].warnlimit =
452 le32_to_cpu(sb_quota->q[i].c[j].warnlimit);
457 static int bch2_fs_quota_read_inode(struct btree_trans *trans,
458 struct btree_iter *iter,
461 struct bch_fs *c = trans->c;
462 struct bch_inode_unpacked u;
463 struct bch_subvolume subvolume;
466 ret = bch2_snapshot_get_subvol(trans, k.k->p.snapshot, &subvolume);
471 * We don't do quota accounting in snapshots:
473 if (BCH_SUBVOLUME_SNAP(&subvolume))
476 if (!bkey_is_inode(k.k))
479 ret = bch2_inode_unpack(k, &u);
483 bch2_quota_acct(c, bch_qid(&u), Q_SPC, u.bi_sectors,
484 KEY_TYPE_QUOTA_NOCHECK);
485 bch2_quota_acct(c, bch_qid(&u), Q_INO, 1,
486 KEY_TYPE_QUOTA_NOCHECK);
488 bch2_btree_iter_set_pos(iter, POS(iter->pos.inode, iter->pos.offset + 1));
492 int bch2_fs_quota_read(struct bch_fs *c)
494 unsigned i, qtypes = enabled_qtypes(c);
495 struct bch_memquota_type *q;
496 struct btree_trans trans;
497 struct btree_iter iter;
501 mutex_lock(&c->sb_lock);
502 bch2_sb_quota_read(c);
503 mutex_unlock(&c->sb_lock);
505 for_each_set_qtype(c, i, q, qtypes) {
506 ret = bch2_quota_init_type(c, i);
511 bch2_trans_init(&trans, c, 0, 0);
513 ret = for_each_btree_key2(&trans, iter, BTREE_ID_inodes,
517 BTREE_ITER_ALL_SNAPSHOTS,
519 bch2_fs_quota_read_inode(&trans, &iter, k));
521 bch_err(c, "err reading inodes in quota init: %i", ret);
523 bch2_trans_exit(&trans);
527 /* Enable/disable/delete quotas for an entire filesystem: */
529 static int bch2_quota_enable(struct super_block *sb, unsigned uflags)
531 struct bch_fs *c = sb->s_fs_info;
533 if (sb->s_flags & SB_RDONLY)
536 /* Accounting must be enabled at mount time: */
537 if (uflags & (FS_QUOTA_UDQ_ACCT|FS_QUOTA_GDQ_ACCT|FS_QUOTA_PDQ_ACCT))
540 /* Can't enable enforcement without accounting: */
541 if ((uflags & FS_QUOTA_UDQ_ENFD) && !c->opts.usrquota)
544 if ((uflags & FS_QUOTA_GDQ_ENFD) && !c->opts.grpquota)
547 if (uflags & FS_QUOTA_PDQ_ENFD && !c->opts.prjquota)
550 mutex_lock(&c->sb_lock);
551 if (uflags & FS_QUOTA_UDQ_ENFD)
552 SET_BCH_SB_USRQUOTA(c->disk_sb.sb, true);
554 if (uflags & FS_QUOTA_GDQ_ENFD)
555 SET_BCH_SB_GRPQUOTA(c->disk_sb.sb, true);
557 if (uflags & FS_QUOTA_PDQ_ENFD)
558 SET_BCH_SB_PRJQUOTA(c->disk_sb.sb, true);
561 mutex_unlock(&c->sb_lock);
566 static int bch2_quota_disable(struct super_block *sb, unsigned uflags)
568 struct bch_fs *c = sb->s_fs_info;
570 if (sb->s_flags & SB_RDONLY)
573 mutex_lock(&c->sb_lock);
574 if (uflags & FS_QUOTA_UDQ_ENFD)
575 SET_BCH_SB_USRQUOTA(c->disk_sb.sb, false);
577 if (uflags & FS_QUOTA_GDQ_ENFD)
578 SET_BCH_SB_GRPQUOTA(c->disk_sb.sb, false);
580 if (uflags & FS_QUOTA_PDQ_ENFD)
581 SET_BCH_SB_PRJQUOTA(c->disk_sb.sb, false);
584 mutex_unlock(&c->sb_lock);
589 static int bch2_quota_remove(struct super_block *sb, unsigned uflags)
591 struct bch_fs *c = sb->s_fs_info;
594 if (sb->s_flags & SB_RDONLY)
597 if (uflags & FS_USER_QUOTA) {
598 if (c->opts.usrquota)
601 ret = bch2_btree_delete_range(c, BTREE_ID_quotas,
603 POS(QTYP_USR + 1, 0),
609 if (uflags & FS_GROUP_QUOTA) {
610 if (c->opts.grpquota)
613 ret = bch2_btree_delete_range(c, BTREE_ID_quotas,
615 POS(QTYP_GRP + 1, 0),
621 if (uflags & FS_PROJ_QUOTA) {
622 if (c->opts.prjquota)
625 ret = bch2_btree_delete_range(c, BTREE_ID_quotas,
627 POS(QTYP_PRJ + 1, 0),
637 * Return quota status information, such as enforcements, quota file inode
640 static int bch2_quota_get_state(struct super_block *sb, struct qc_state *state)
642 struct bch_fs *c = sb->s_fs_info;
643 unsigned qtypes = enabled_qtypes(c);
646 memset(state, 0, sizeof(*state));
648 for (i = 0; i < QTYP_NR; i++) {
649 state->s_state[i].flags |= QCI_SYSFILE;
651 if (!(qtypes & (1 << i)))
654 state->s_state[i].flags |= QCI_ACCT_ENABLED;
656 state->s_state[i].spc_timelimit = c->quotas[i].limits[Q_SPC].timelimit;
657 state->s_state[i].spc_warnlimit = c->quotas[i].limits[Q_SPC].warnlimit;
659 state->s_state[i].ino_timelimit = c->quotas[i].limits[Q_INO].timelimit;
660 state->s_state[i].ino_warnlimit = c->quotas[i].limits[Q_INO].warnlimit;
667 * Adjust quota timers & warnings
669 static int bch2_quota_set_info(struct super_block *sb, int type,
670 struct qc_info *info)
672 struct bch_fs *c = sb->s_fs_info;
673 struct bch_sb_field_quota *sb_quota;
674 struct bch_memquota_type *q;
676 if (sb->s_flags & SB_RDONLY)
682 if (!((1 << type) & enabled_qtypes(c)))
685 if (info->i_fieldmask &
686 ~(QC_SPC_TIMER|QC_INO_TIMER|QC_SPC_WARNS|QC_INO_WARNS))
689 q = &c->quotas[type];
691 mutex_lock(&c->sb_lock);
692 sb_quota = bch2_sb_get_quota(c->disk_sb.sb);
694 sb_quota = bch2_sb_resize_quota(&c->disk_sb,
695 sizeof(*sb_quota) / sizeof(u64));
700 if (info->i_fieldmask & QC_SPC_TIMER)
701 sb_quota->q[type].c[Q_SPC].timelimit =
702 cpu_to_le32(info->i_spc_timelimit);
704 if (info->i_fieldmask & QC_SPC_WARNS)
705 sb_quota->q[type].c[Q_SPC].warnlimit =
706 cpu_to_le32(info->i_spc_warnlimit);
708 if (info->i_fieldmask & QC_INO_TIMER)
709 sb_quota->q[type].c[Q_INO].timelimit =
710 cpu_to_le32(info->i_ino_timelimit);
712 if (info->i_fieldmask & QC_INO_WARNS)
713 sb_quota->q[type].c[Q_INO].warnlimit =
714 cpu_to_le32(info->i_ino_warnlimit);
716 bch2_sb_quota_read(c);
719 mutex_unlock(&c->sb_lock);
724 /* Get/set individual quotas: */
726 static void __bch2_quota_get(struct qc_dqblk *dst, struct bch_memquota *src)
728 dst->d_space = src->c[Q_SPC].v << 9;
729 dst->d_spc_hardlimit = src->c[Q_SPC].hardlimit << 9;
730 dst->d_spc_softlimit = src->c[Q_SPC].softlimit << 9;
731 dst->d_spc_timer = src->c[Q_SPC].timer;
732 dst->d_spc_warns = src->c[Q_SPC].warns;
734 dst->d_ino_count = src->c[Q_INO].v;
735 dst->d_ino_hardlimit = src->c[Q_INO].hardlimit;
736 dst->d_ino_softlimit = src->c[Q_INO].softlimit;
737 dst->d_ino_timer = src->c[Q_INO].timer;
738 dst->d_ino_warns = src->c[Q_INO].warns;
741 static int bch2_get_quota(struct super_block *sb, struct kqid kqid,
742 struct qc_dqblk *qdq)
744 struct bch_fs *c = sb->s_fs_info;
745 struct bch_memquota_type *q = &c->quotas[kqid.type];
746 qid_t qid = from_kqid(&init_user_ns, kqid);
747 struct bch_memquota *mq;
749 memset(qdq, 0, sizeof(*qdq));
751 mutex_lock(&q->lock);
752 mq = genradix_ptr(&q->table, qid);
754 __bch2_quota_get(qdq, mq);
755 mutex_unlock(&q->lock);
760 static int bch2_get_next_quota(struct super_block *sb, struct kqid *kqid,
761 struct qc_dqblk *qdq)
763 struct bch_fs *c = sb->s_fs_info;
764 struct bch_memquota_type *q = &c->quotas[kqid->type];
765 qid_t qid = from_kqid(&init_user_ns, *kqid);
766 struct genradix_iter iter;
767 struct bch_memquota *mq;
770 mutex_lock(&q->lock);
772 genradix_for_each_from(&q->table, iter, mq, qid)
773 if (memcmp(mq, page_address(ZERO_PAGE(0)), sizeof(*mq))) {
774 __bch2_quota_get(qdq, mq);
775 *kqid = make_kqid(current_user_ns(), kqid->type, iter.pos);
781 mutex_unlock(&q->lock);
785 static int bch2_set_quota_trans(struct btree_trans *trans,
786 struct bkey_i_quota *new_quota,
787 struct qc_dqblk *qdq)
789 struct btree_iter iter;
793 bch2_trans_iter_init(trans, &iter, BTREE_ID_quotas, new_quota->k.p,
794 BTREE_ITER_SLOTS|BTREE_ITER_INTENT);
795 k = bch2_btree_iter_peek_slot(&iter);
801 if (k.k->type == KEY_TYPE_quota)
802 new_quota->v = *bkey_s_c_to_quota(k).v;
804 if (qdq->d_fieldmask & QC_SPC_SOFT)
805 new_quota->v.c[Q_SPC].softlimit = cpu_to_le64(qdq->d_spc_softlimit >> 9);
806 if (qdq->d_fieldmask & QC_SPC_HARD)
807 new_quota->v.c[Q_SPC].hardlimit = cpu_to_le64(qdq->d_spc_hardlimit >> 9);
809 if (qdq->d_fieldmask & QC_INO_SOFT)
810 new_quota->v.c[Q_INO].softlimit = cpu_to_le64(qdq->d_ino_softlimit);
811 if (qdq->d_fieldmask & QC_INO_HARD)
812 new_quota->v.c[Q_INO].hardlimit = cpu_to_le64(qdq->d_ino_hardlimit);
814 ret = bch2_trans_update(trans, &iter, &new_quota->k_i, 0);
815 bch2_trans_iter_exit(trans, &iter);
819 static int bch2_set_quota(struct super_block *sb, struct kqid qid,
820 struct qc_dqblk *qdq)
822 struct bch_fs *c = sb->s_fs_info;
823 struct bkey_i_quota new_quota;
826 if (sb->s_flags & SB_RDONLY)
829 bkey_quota_init(&new_quota.k_i);
830 new_quota.k.p = POS(qid.type, from_kqid(&init_user_ns, qid));
832 ret = bch2_trans_do(c, NULL, NULL, 0,
833 bch2_set_quota_trans(&trans, &new_quota, qdq)) ?:
834 __bch2_quota_set(c, bkey_i_to_s_c(&new_quota.k_i));
839 const struct quotactl_ops bch2_quotactl_operations = {
840 .quota_enable = bch2_quota_enable,
841 .quota_disable = bch2_quota_disable,
842 .rm_xquota = bch2_quota_remove,
844 .get_state = bch2_quota_get_state,
845 .set_info = bch2_quota_set_info,
847 .get_dqblk = bch2_get_quota,
848 .get_nextdqblk = bch2_get_next_quota,
849 .set_dqblk = bch2_set_quota,
852 #endif /* CONFIG_BCACHEFS_QUOTA */