diff options
author | Sargun Dhillon <sargun@sargun.me> | 2017-05-11 21:17:33 +0000 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-06-19 18:25:58 +0200 |
commit | f29efe292198b9dbf67fb79ec9ffb5865ca29fb8 (patch) | |
tree | eadca77167dd1b0c5f03c99b17d7aa00bd79aeff /fs/btrfs/ctree.h | |
parent | a5ed45f8224f2c7e4ad5a9673cb50e8e3128bd88 (diff) | |
download | op-kernel-dev-f29efe292198b9dbf67fb79ec9ffb5865ca29fb8.zip op-kernel-dev-f29efe292198b9dbf67fb79ec9ffb5865ca29fb8.tar.gz |
btrfs: add quota override flag to enable quota override for CAP_SYS_RESOURCE
This patch introduces the quota override flag to btrfs_fs_info, and a
change to quota limit checking code to temporarily allow for quota to be
overridden for processes with CAP_SYS_RESOURCE.
It's useful for administrative programs, such as log rotation, that may
need to temporarily use more disk space in order to free up a greater
amount of overall disk space without yielding more disk space to the
rest of userland.
Eventually, we may want to add the idea of an operator-specific quota,
operator reserved space, or something else to allow for administrative
override, but this is perhaps the simplest solution.
Signed-off-by: Sargun Dhillon <sargun@sargun.me>
Reviewed-by: David Sterba <dsterba@suse.com>
[ minor changelog edits ]
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 0334452..aea1b3c 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -716,6 +716,8 @@ struct btrfs_delayed_root; #define BTRFS_FS_BTREE_ERR 11 #define BTRFS_FS_LOG1_ERR 12 #define BTRFS_FS_LOG2_ERR 13 +#define BTRFS_FS_QUOTA_OVERRIDE 14 + /* * Indicate that a whole-filesystem exclusive operation is running * (device replace, resize, device add/delete, balance) |