aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/uapi/linux/btrfs_tree.h
diff options
context:
space:
mode:
authorBoris Burkov <boris@bur.io>2023-05-16 16:35:45 -0700
committerDavid Sterba <dsterba@suse.com>2023-10-12 16:44:10 +0200
commit182940f4f4dbd932776414744c8de64333957725 (patch)
tree07417b40b655ad74807cd02963c966aaf8eef358 /include/uapi/linux/btrfs_tree.h
parentbtrfs: qgroup: introduce quota mode (diff)
downloadwireguard-linux-182940f4f4dbd932776414744c8de64333957725.tar.xz
wireguard-linux-182940f4f4dbd932776414744c8de64333957725.zip
btrfs: qgroup: add new quota mode for simple quotas
Add a new quota mode called "simple quotas". It can be enabled by the existing quota enable ioctl via a new command, and sets an incompat bit, as the implementation of simple quotas will make backwards incompatible changes to the disk format of the extent tree. Signed-off-by: Boris Burkov <boris@bur.io> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'include/uapi/linux/btrfs_tree.h')
-rw-r--r--include/uapi/linux/btrfs_tree.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/uapi/linux/btrfs_tree.h b/include/uapi/linux/btrfs_tree.h
index ca65d7b7a6ca..a1d5347f6adb 100644
--- a/include/uapi/linux/btrfs_tree.h
+++ b/include/uapi/linux/btrfs_tree.h
@@ -1233,9 +1233,17 @@ static inline __u16 btrfs_qgroup_level(__u64 qgroupid)
*/
#define BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT (1ULL << 2)
+/*
+ * Whether or not this filesystem is using simple quotas. Not exactly the
+ * incompat bit, because we support using simple quotas, disabling it, then
+ * going back to full qgroup quotas.
+ */
+#define BTRFS_QGROUP_STATUS_FLAG_SIMPLE_MODE (1ULL << 3)
+
#define BTRFS_QGROUP_STATUS_FLAGS_MASK (BTRFS_QGROUP_STATUS_FLAG_ON | \
BTRFS_QGROUP_STATUS_FLAG_RESCAN | \
- BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT)
+ BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT | \
+ BTRFS_QGROUP_STATUS_FLAG_SIMPLE_MODE)
#define BTRFS_QGROUP_STATUS_VERSION 1