Re: Qgroups are not applied when snapshotting a subvol?

2017-03-29 Thread Austin S. Hemmelgarn
On 2017-03-29 01:38, Duncan wrote: Austin S. Hemmelgarn posted on Tue, 28 Mar 2017 07:44:56 -0400 as excerpted: On 2017-03-27 21:49, Qu Wenruo wrote: The problem is, how should we treat subvolume. Btrfs subvolume sits in the middle of directory and (logical) volume used in traditional

Re: Qgroups are not applied when snapshotting a subvol?

2017-03-28 Thread Marat Khalili
If we were going to reserve something, it should be a high number, not a low one. Having 0 reserved makes some sense, but reserving other low numbers seems kind of odd when they aren't already reserved. I did some experiments. Currently assigning higher-level qgroup to lower-level qgroup is

Re: Qgroups are not applied when snapshotting a subvol?

2017-03-28 Thread Duncan
Austin S. Hemmelgarn posted on Tue, 28 Mar 2017 07:44:56 -0400 as excerpted: > On 2017-03-27 21:49, Qu Wenruo wrote: >> The problem is, how should we treat subvolume. >> >> Btrfs subvolume sits in the middle of directory and (logical) volume >> used in traditional stacked solution. >> >> While

Re: Qgroups are not applied when snapshotting a subvol?

2017-03-28 Thread Austin S. Hemmelgarn
On 2017-03-28 09:53, Marat Khalili wrote: There are a couple of reasons I'm advocating the specific behavior I outlined: Some of your points are valid, but some break current behaviour and expectations or create technical difficulties. 1. It doesn't require any specific qgroup setup. By

Re: Qgroups are not applied when snapshotting a subvol?

2017-03-28 Thread Marat Khalili
There are a couple of reasons I'm advocating the specific behavior I outlined: Some of your points are valid, but some break current behaviour and expectations or create technical difficulties. 1. It doesn't require any specific qgroup setup. By definition, you can be 100% certain that the

Re: Qgroups are not applied when snapshotting a subvol?

2017-03-28 Thread Austin S. Hemmelgarn
On 2017-03-28 08:00, Marat Khalili wrote: 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

Re: Qgroups are not applied when snapshotting a subvol?

2017-03-28 Thread Marat Khalili
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

Re: Qgroups are not applied when snapshotting a subvol?

2017-03-28 Thread Austin S. Hemmelgarn
On 2017-03-27 21:49, Qu Wenruo wrote: At 03/27/2017 08:01 PM, Austin S. Hemmelgarn wrote: On 2017-03-27 07:02, Moritz Sichert wrote: Am 27.03.2017 um 05:46 schrieb Qu Wenruo: At 03/27/2017 11:26 AM, Andrei Borzenkov wrote: 27.03.2017 03:39, Qu Wenruo пишет: At 03/26/2017 06:03 AM,

Re: Qgroups are not applied when snapshotting a subvol?

2017-03-28 Thread Austin S. Hemmelgarn
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

Re: Qgroups are not applied when snapshotting a subvol?

2017-03-27 Thread Duncan
Duncan posted on Tue, 28 Mar 2017 02:41:52 + as excerpted: > Which in usual terms means making the perms root-only, with the binary > set to some controlled-access group and set-SUID-root (or appropriate > security attributes, I'm drawing a blank on the word I want ATM), and > then letting

Re: Qgroups are not applied when snapshotting a subvol?

2017-03-27 Thread Andrei Borzenkov
27.03.2017 22:32, Chris Murphy пишет: > 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? >

Re: Qgroups are not applied when snapshotting a subvol?

2017-03-27 Thread Duncan
Chris Murphy posted on Mon, 27 Mar 2017 15:11:34 -0600 as excerpted: >> What are actual use cases for creating subvolumes by 'normal' users? >> >> Does someone have an example? >> >> Why is it possible at all, by default? > > I have a single git subvolume in my user directory, inside of which

Re: Qgroups are not applied when snapshotting a subvol?

2017-03-27 Thread Qu Wenruo
At 03/27/2017 08:01 PM, Austin S. Hemmelgarn wrote: On 2017-03-27 07:02, Moritz Sichert wrote: Am 27.03.2017 um 05:46 schrieb Qu Wenruo: At 03/27/2017 11:26 AM, Andrei Borzenkov wrote: 27.03.2017 03:39, Qu Wenruo пишет: At 03/26/2017 06:03 AM, Moritz Sichert wrote: Hi, I tried to

Re: Qgroups are not applied when snapshotting a subvol?

2017-03-27 Thread Chris Murphy
On Mon, Mar 27, 2017 at 2:06 PM, Hans van Kranenburg wrote: > On 03/27/2017 09:53 PM, Roman Mamedov wrote: >> On Mon, 27 Mar 2017 13:32:47 -0600 >> Chris Murphy wrote: >> >>> How about if qgroups are enabled, then non-root user is

Re: Qgroups are not applied when snapshotting a subvol?

2017-03-27 Thread Hans van Kranenburg
On 03/27/2017 09:53 PM, Roman Mamedov wrote: > On Mon, 27 Mar 2017 13:32:47 -0600 > Chris Murphy wrote: > >> How about if qgroups are enabled, then non-root user is prevented from >> creating new subvolumes? > > That sounds like, if you turn your headlights on in a car,

Re: Qgroups are not applied when snapshotting a subvol?

2017-03-27 Thread Roman Mamedov
On Mon, 27 Mar 2017 13:32:47 -0600 Chris Murphy wrote: > How about if qgroups are enabled, then non-root user is prevented from > creating new subvolumes? That sounds like, if you turn your headlights on in a car, then in-vehicle air conditioner randomly stops working.

Re: Qgroups are not applied when snapshotting a subvol?

2017-03-27 Thread Chris Murphy
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. Chris Murphy -- To unsubscribe from

Re: Qgroups are not applied when snapshotting a subvol?

2017-03-27 Thread Austin S. Hemmelgarn
On 2017-03-27 07:02, Moritz Sichert wrote: Am 27.03.2017 um 05:46 schrieb Qu Wenruo: At 03/27/2017 11:26 AM, Andrei Borzenkov wrote: 27.03.2017 03:39, Qu Wenruo пишет: At 03/26/2017 06:03 AM, Moritz Sichert wrote: Hi, I tried to configure qgroups on a btrfs filesystem but was really

Re: Qgroups are not applied when snapshotting a subvol?

2017-03-27 Thread Moritz Sichert
Am 27.03.2017 um 05:46 schrieb Qu Wenruo: > > > At 03/27/2017 11:26 AM, Andrei Borzenkov wrote: >> 27.03.2017 03:39, Qu Wenruo пишет: >>> >>> >>> At 03/26/2017 06:03 AM, Moritz Sichert wrote: Hi, I tried to configure qgroups on a btrfs filesystem but was really surprised that

Re: Qgroups are not applied when snapshotting a subvol?

2017-03-26 Thread Qu Wenruo
At 03/27/2017 11:26 AM, Andrei Borzenkov wrote: 27.03.2017 03:39, Qu Wenruo пишет: At 03/26/2017 06:03 AM, Moritz Sichert wrote: Hi, I tried to configure qgroups on a btrfs filesystem but was really surprised that when you snapshot a subvolume, the snapshot will not be assigned to the

Re: Qgroups are not applied when snapshotting a subvol?

2017-03-26 Thread Andrei Borzenkov
27.03.2017 03:39, Qu Wenruo пишет: > > > At 03/26/2017 06:03 AM, Moritz Sichert wrote: >> Hi, >> >> I tried to configure qgroups on a btrfs filesystem but was really >> surprised that when you snapshot a subvolume, the snapshot will not be >> assigned to the qgroup the subvolume was in. >> >> As

Re: Qgroups are not applied when snapshotting a subvol?

2017-03-26 Thread Qu Wenruo
At 03/26/2017 06:03 AM, Moritz Sichert wrote: Hi, I tried to configure qgroups on a btrfs filesystem but was really surprised that when you snapshot a subvolume, the snapshot will not be assigned to the qgroup the subvolume was in. As an example consider the small terminal session in the

Re: Qgroups are not applied when snapshotting a subvol?

2017-03-25 Thread Duncan
Moritz Sichert posted on Sat, 25 Mar 2017 23:03:26 +0100 as excerpted: > I tried to configure qgroups on a btrfs filesystem but was really > surprised that when you snapshot a subvolume, the snapshot will not be > assigned to the qgroup the subvolume was in. > I feel like I must be missing

Qgroups are not applied when snapshotting a subvol?

2017-03-25 Thread Moritz Sichert
Hi, I tried to configure qgroups on a btrfs filesystem but was really surprised that when you snapshot a subvolume, the snapshot will not be assigned to the qgroup the subvolume was in. As an example consider the small terminal session in the attachment: I create a subvol A, assign it to