summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2018-01-09 04:34:35 -0500
committerKent Overstreet <kent.overstreet@gmail.com>2018-07-10 06:12:12 -0400
commit211222e56a9d3914c34c6b866c3b9779d363836d (patch)
tree56f9019f8163a89c472d7ebffbc442168dee57cd
parentd7694c952073bf2ebb852014d9f979b5e3e7c018 (diff)
Add bcachefs support
-rw-r--r--mntopt.h1
-rw-r--r--quotasys.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/mntopt.h b/mntopt.h
index 0f3b0c5..019a00d 100644
--- a/mntopt.h
+++ b/mntopt.h
@@ -22,6 +22,7 @@
#define MNTTYPE_MPFS "mpfs" /* EMC Celerra MPFS filesystem */
#define MNTTYPE_OCFS2 "ocfs2" /* Oracle Cluster filesystem */
#define MNTTYPE_GFS2 "gfs2" /* Red Hat Global filesystem 2 */
+#define MNTTYPE_BCACHEFS "bcachefs"
#ifndef MNTTYPE_NFS
#define MNTTYPE_NFS "nfs" /* Network file system. */
diff --git a/quotasys.c b/quotasys.c
index d8c0e48..3ac9387 100644
--- a/quotasys.c
+++ b/quotasys.c
@@ -786,6 +786,9 @@ static int hasquota(const char *dev, struct mntent *mnt, int type, int flags)
return hasxfsquota(dev, mnt, type, flags);
if (!strcmp(mnt->mnt_type, MNTTYPE_OCFS2))
return hasvfsmetaquota(dev, mnt, type, flags);
+
+ if (!strcmp(mnt->mnt_type, MNTTYPE_BCACHEFS))
+ return hasxfsquota(dev, mnt, type, flags) != QF_ERROR ? QF_META : QF_ERROR;
/*
* For ext4 we check whether it has quota in system files and if not,
* we fall back on checking standard quotas. Furthermore we cannot use