]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: add quota override flag to enable quota override for CAP_SYS_RESOURCE
authorSargun Dhillon <sargun@sargun.me>
Thu, 11 May 2017 21:17:33 +0000 (21:17 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Jun 2017 16:25:58 +0000 (18:25 +0200)
commit18b0e32ae844b8336b66b96099fe303944ae28b4
treeeadca77167dd1b0c5f03c99b17d7aa00bd79aeff
parent886035d4ae29a61f71b9ceeef1c6753fecf89512
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>
fs/btrfs/ctree.h
fs/btrfs/qgroup.c