All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marat Khalili <mkh@rqc.ru>
To: linux-btrfs@vger.kernel.org
Subject: Re: Qgroups are not applied when snapshotting a subvol?
Date: Tue, 28 Mar 2017 15:00:01 +0300	[thread overview]
Message-ID: <1c8a021b-d258-3a50-3104-d898662c4375@rqc.ru> (raw)
In-Reply-To: <11740657-b2f9-36ab-9644-df2db29dd174@gmail.com>

> The default should be to inherit the qgroup of the parent subvolume.
This behaviour is only good for this particular use-case. In general 
case, qgroups of subvolume and snapshots should exist separately, and 
both can be included in some higher level qgroup (after all, that's what 
qgroup hierarchy is for).

In my system I found it convenient to include subvolume and its 
snapshots in qgroup 1/N, where 0/N is qgroup of bare subvolume. I think 
adopting this behaviour as default would be more sensible.

--

With Best Regards,
Marat Khalili

On 28/03/17 14:24, Austin S. Hemmelgarn wrote:
> On 2017-03-27 15:32, Chris Murphy wrote:
>> How about if qgroups are enabled, then non-root user is prevented from
>> creating new subvolumes?
>>
>> Or is there a way for a new nested subvolume to be included in its
>> parent's quota, rather than the new subvolume having a whole new quota
>> limit?
>>
>> Tricky problem.
> The default should be to inherit the qgroup of the parent subvolume. 
> The organization of subvolumes is hierarchical, and sane people expect 
> things to behave as they look.  Taking another angle, on ZFS, 'nested' 
> (nested in quotes because ZFS' definition of 'nested' zvols is weird) 
> inherit their parent's quota and reservations (essentially reverse 
> quota), and they're not even inherently nested in the filesystem like 
> subvolumes are, so we're differing from the only other widely used 
> system that implements things in a similar manner.
>
> As far as the subvolume thing, there should be an option to disable 
> user creation of subvolumes, and ideally it should be on by default 
> because:
> 1. Users can't delete subvolumes by default.  This means they can 
> create but not destroy a resource by default, which means that a user 
> can pretty easily accidentally cause issues for the system as a whole.
> 2. Correlating with 1, users being able to delete subvolumes by 
> default is not safe on multiple levels (easy accidental data loss, 
> numerous other issues), and thus user subvolume removal being off by 
> default is significantly safer.
>
> -- 
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


  reply	other threads:[~2017-03-28 12:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-25 22:03 Qgroups are not applied when snapshotting a subvol? Moritz Sichert
2017-03-26  5:45 ` Duncan
2017-03-27  0:39 ` Qu Wenruo
2017-03-27  3:26   ` Andrei Borzenkov
2017-03-27  3:46     ` Qu Wenruo
2017-03-27 11:02       ` Moritz Sichert
2017-03-27 12:01         ` Austin S. Hemmelgarn
2017-03-27 19:32           ` Chris Murphy
2017-03-27 19:53             ` Roman Mamedov
2017-03-27 20:06               ` Hans van Kranenburg
2017-03-27 21:11                 ` Chris Murphy
2017-03-28  2:41                   ` Duncan
2017-03-28  5:21                     ` Duncan
2017-03-28  3:56             ` Andrei Borzenkov
2017-03-28 11:24             ` Austin S. Hemmelgarn
2017-03-28 12:00               ` Marat Khalili [this message]
2017-03-28 12:20                 ` Austin S. Hemmelgarn
2017-03-28 13:53                   ` Marat Khalili
2017-03-28 15:24                     ` Austin S. Hemmelgarn
2017-03-29  5:53                       ` Marat Khalili
2017-03-28  1:49           ` Qu Wenruo
2017-03-28 11:44             ` Austin S. Hemmelgarn
2017-03-29  5:38               ` Duncan
2017-03-29 11:36                 ` Austin S. Hemmelgarn

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=1c8a021b-d258-3a50-3104-d898662c4375@rqc.ru \
    --to=mkh@rqc.ru \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.