linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sargun Dhillon <sargun@sargun.me>
To: Adam Borowski <kilobyte@angband.pl>
Cc: BTRFS ML <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] btrfs: allow processes with cap_sys_resource to exceed quota
Date: Fri, 21 Apr 2017 07:27:23 -0500	[thread overview]
Message-ID: <CAMp4zn_XkDpmcG4szqv95mAeVeikkTUJWH1vAObduLu7fozL4w@mail.gmail.com> (raw)
In-Reply-To: <20170421110558.lx56fsrbengxqwuy@angband.pl>

What do you think about putting this behaviour behind a sysctl? Seems
better than to start introducing a new mechanism of marking tasks?

On Fri, Apr 21, 2017 at 6:05 AM, Adam Borowski <kilobyte@angband.pl> wrote:
> On Fri, Apr 21, 2017 at 10:09:46AM +0000, Sargun Dhillon wrote:
>> This patch allows processes with CAP_SYS_RESOURCE to exceed the qgroup
>> limit. 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.
>
>>  static bool qgroup_check_limits(const struct btrfs_qgroup *qg, u64 num_bytes)
>>  {
>> +     if (capable(CAP_SYS_RESOURCE))
>> +             return true;
>> +
>
> I don't think it's a good idea to make random root-uid processes ignore
> qgroups completely.  Just because the daemon in question doesn't use a
> separate uid is no reason to not protect you from it consuming all the disk
> space.
>
> A temporary request "please let me exceed limits" would make sense, though.
>
> The problem with CAP_SYS_RESOURCE is that it's always on unless explicitly
> dropped.
>
> --
> ⢀⣴⠾⠻⢶⣦⠀ Meow!
> ⣾⠁⢠⠒⠀⣿⡁
> ⢿⡄⠘⠷⠚⠋⠀ Collisions shmolisions, let's see them find a collision or second
> ⠈⠳⣄⠀⠀⠀⠀ preimage for double rot13!

  reply	other threads:[~2017-04-21 12:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-21 10:09 [PATCH] btrfs: allow processes with cap_sys_resource to exceed quota Sargun Dhillon
2017-04-21 10:34 ` Sargun Dhillon
2017-04-21 11:05 ` Adam Borowski
2017-04-21 12:27   ` Sargun Dhillon [this message]
2017-05-05 18:22     ` David Sterba
2017-05-05 18:25       ` Sargun Dhillon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMp4zn_XkDpmcG4szqv95mAeVeikkTUJWH1vAObduLu7fozL4w@mail.gmail.com \
    --to=sargun@sargun.me \
    --cc=kilobyte@angband.pl \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).