summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/fs.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-10-27 13:05:56 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:17 -0400
commit9ca4853b98af5fa15a2ddc47a45f8e103027f95d (patch)
tree28b8be8ce679f0b5503de7fa68d9b0f2c5483bc9 /fs/bcachefs/fs.h
parentb44a66a64123efb3e6aebaa0cedec722ecbfbba4 (diff)
downloadlinux-9ca4853b98af5fa15a2ddc47a45f8e103027f95d.tar.gz
linux-9ca4853b98af5fa15a2ddc47a45f8e103027f95d.tar.bz2
linux-9ca4853b98af5fa15a2ddc47a45f8e103027f95d.zip
bcachefs: Fix quota support for snapshots
Quota support was disabled when snapshots were released, because of some tricky interactions with snpashots. We're sidestepping that for now - we're simply disabling quota accounting on snapshot subvolumes. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/fs.h')
-rw-r--r--fs/bcachefs/fs.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/bcachefs/fs.h b/fs/bcachefs/fs.h
index 530238780a88..a67ab1ad2a31 100644
--- a/fs/bcachefs/fs.h
+++ b/fs/bcachefs/fs.h
@@ -63,6 +63,12 @@ static inline subvol_inum inode_inum(struct bch_inode_info *inode)
*/
#define EI_INODE_ERROR 0
+/*
+ * Set in the inode is in a snapshot subvolume - we don't do quota accounting in
+ * those:
+ */
+#define EI_INODE_SNAPSHOT 1
+
#define to_bch_ei(_inode) \
container_of_or_null(_inode, struct bch_inode_info, v)