linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] design: Document project quota inode
@ 2018-08-06 21:10 Marco Benatto
  2018-08-07 11:17 ` Carlos Maiolino
  2018-08-07 15:10 ` Darrick J. Wong
  0 siblings, 2 replies; 7+ messages in thread
From: Marco Benatto @ 2018-08-06 21:10 UTC (permalink / raw)
  To: linux-xfs; +Cc: mbenatto, darrick.wong

A project quota inode was introduced into V5 superblock allowing
project quotas and group quotas to be used simultaneously. However
on "Quota Inodes" section we still mention it's not possible to
use project and group quotas at sametime.

This patch documents this behavior for V5 and later superblocks,
while keeps documented the old behavior for earlier versions.

Signed-off-by: Marco Benatto <mbenatto@redhat.com>
---
 design/XFS_Filesystem_Structure/internal_inodes.asciidoc | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/design/XFS_Filesystem_Structure/internal_inodes.asciidoc b/design/XFS_Filesystem_Structure/internal_inodes.asciidoc
index f5c2654..b694e74 100644
--- a/design/XFS_Filesystem_Structure/internal_inodes.asciidoc
+++ b/design/XFS_Filesystem_Structure/internal_inodes.asciidoc
@@ -8,9 +8,12 @@ accessible from the superblock.
 [[Quota_Inodes]]
 == Quota Inodes
 
-If quotas are used, two inodes are allocated for user and group quota
-management. If project quotas are used, these replace the group quota management
-and therefore uses the group quota inode.
+If quotas are used, prior to version 5 superblocks, two inodes are allocated for
+user and group management. In this case if project quotas are used, these replace
+the group quota management and therefore uses the group quota inode.
+
+In version 5 superblock or later a third inode will be allocated to project quota
+management, making it possible to use group and project quotas management simultaneously.
 
 * Project quota's primary purpose is to track and monitor disk usage for
 directories. For this to occur, the directory inode must have the
@@ -28,7 +31,7 @@ multiplied by the size of +xfs_dqblk_t+ (136 bytes).
 .Quota inode layout
 image::images/76.png[]
 
-Quota information is stored in the data extents of the two reserved quota
+Quota information is stored in the data extents of the reserved quota
 inodes as an array of the +xfs_dqblk+ structures, where there is one array
 element for each ID in the system:
 
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] design: Document project quota inode
  2018-08-06 21:10 [PATCH] design: Document project quota inode Marco Benatto
@ 2018-08-07 11:17 ` Carlos Maiolino
  2018-08-07 13:13   ` Marco Benatto
  2018-08-07 15:10 ` Darrick J. Wong
  1 sibling, 1 reply; 7+ messages in thread
From: Carlos Maiolino @ 2018-08-07 11:17 UTC (permalink / raw)
  To: Marco Benatto; +Cc: linux-xfs, darrick.wong

On Mon, Aug 06, 2018 at 06:10:32PM -0300, Marco Benatto wrote:
> A project quota inode was introduced into V5 superblock allowing
> project quotas and group quotas to be used simultaneously. However
> on "Quota Inodes" section we still mention it's not possible to
> use project and group quotas at sametime.
> 
> This patch documents this behavior for V5 and later superblocks,
> while keeps documented the old behavior for earlier versions.
> 
> Signed-off-by: Marco Benatto <mbenatto@redhat.com>
> ---
>  design/XFS_Filesystem_Structure/internal_inodes.asciidoc | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/design/XFS_Filesystem_Structure/internal_inodes.asciidoc b/design/XFS_Filesystem_Structure/internal_inodes.asciidoc
> index f5c2654..b694e74 100644
> --- a/design/XFS_Filesystem_Structure/internal_inodes.asciidoc
> +++ b/design/XFS_Filesystem_Structure/internal_inodes.asciidoc
> @@ -8,9 +8,12 @@ accessible from the superblock.
>  [[Quota_Inodes]]
>  == Quota Inodes
>  
> -If quotas are used, two inodes are allocated for user and group quota
> -management. If project quotas are used, these replace the group quota management
> -and therefore uses the group quota inode.
> +If quotas are used, prior to version 5 superblocks, two inodes are allocated for
> +user and group management. In this case if project quotas are used, these replace
> +the group quota management and therefore uses the group quota inode.
> +
> +In version 5 superblock or later a third inode will be allocated to project quota
> +management, making it possible to use group and project quotas management simultaneously.

This is mostly ok, but I wonder we the V5 behavior should be emphasized, instead
of V4 behavior?


>  
>  * Project quota's primary purpose is to track and monitor disk usage for
>  directories. For this to occur, the directory inode must have the
> @@ -28,7 +31,7 @@ multiplied by the size of +xfs_dqblk_t+ (136 bytes).
>  .Quota inode layout
>  image::images/76.png[]
>  
> -Quota information is stored in the data extents of the two reserved quota
> +Quota information is stored in the data extents of the reserved quota
>  inodes as an array of the +xfs_dqblk+ structures, where there is one array
>  element for each ID in the system:
>  
> -- 
> 2.9.5
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Carlos

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] design: Document project quota inode
  2018-08-07 11:17 ` Carlos Maiolino
@ 2018-08-07 13:13   ` Marco Benatto
  0 siblings, 0 replies; 7+ messages in thread
From: Marco Benatto @ 2018-08-07 13:13 UTC (permalink / raw)
  To: Marco Benatto, linux-xfs, Darrick J. Wong

On Tue, Aug 7, 2018 at 8:17 AM, Carlos Maiolino <cmaiolino@redhat.com> wrote:
> On Mon, Aug 06, 2018 at 06:10:32PM -0300, Marco Benatto wrote:
>> A project quota inode was introduced into V5 superblock allowing
>> project quotas and group quotas to be used simultaneously. However
>> on "Quota Inodes" section we still mention it's not possible to
>> use project and group quotas at sametime.
>>
>> This patch documents this behavior for V5 and later superblocks,
>> while keeps documented the old behavior for earlier versions.
>>
>> Signed-off-by: Marco Benatto <mbenatto@redhat.com>
>> ---
>>  design/XFS_Filesystem_Structure/internal_inodes.asciidoc | 11 +++++++----
>>  1 file changed, 7 insertions(+), 4 deletions(-)
>>
>> diff --git a/design/XFS_Filesystem_Structure/internal_inodes.asciidoc b/design/XFS_Filesystem_Structure/internal_inodes.asciidoc
>> index f5c2654..b694e74 100644
>> --- a/design/XFS_Filesystem_Structure/internal_inodes.asciidoc
>> +++ b/design/XFS_Filesystem_Structure/internal_inodes.asciidoc
>> @@ -8,9 +8,12 @@ accessible from the superblock.
>>  [[Quota_Inodes]]
>>  == Quota Inodes
>>
>> -If quotas are used, two inodes are allocated for user and group quota
>> -management. If project quotas are used, these replace the group quota management
>> -and therefore uses the group quota inode.
>> +If quotas are used, prior to version 5 superblocks, two inodes are allocated for
>> +user and group management. In this case if project quotas are used, these replace
>> +the group quota management and therefore uses the group quota inode.
>> +
>> +In version 5 superblock or later a third inode will be allocated to project quota
>> +management, making it possible to use group and project quotas management simultaneously.
>
> This is mostly ok, but I wonder we the V5 behavior should be emphasized, instead
> of V4 behavior?

I think most of people already know the V4 behavior, or at least I
have seen people think
gquota and pquota are mutually exclusive (including myself) on V5.

Also sb_pquotino is documented on section 12.1 - Superblocks under V5 field, but
when describing quota behavior on Inter Inodes section we still claim
both group and
project quotas cannot be used concurrently which imho may lead to
misunderstanding.

My intention was to make sure V5 behavior is documented while we don't
lose the V4
behavior description.

Please let me know if this way works well..

Thanks for your review.


>
>
>>
>>  * Project quota's primary purpose is to track and monitor disk usage for
>>  directories. For this to occur, the directory inode must have the
>> @@ -28,7 +31,7 @@ multiplied by the size of +xfs_dqblk_t+ (136 bytes).
>>  .Quota inode layout
>>  image::images/76.png[]
>>
>> -Quota information is stored in the data extents of the two reserved quota
>> +Quota information is stored in the data extents of the reserved quota
>>  inodes as an array of the +xfs_dqblk+ structures, where there is one array
>>  element for each ID in the system:
>>
>> --
>> 2.9.5
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
> --
> Carlos

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] design: Document project quota inode
  2018-08-06 21:10 [PATCH] design: Document project quota inode Marco Benatto
  2018-08-07 11:17 ` Carlos Maiolino
@ 2018-08-07 15:10 ` Darrick J. Wong
  2018-08-07 15:28   ` Darrick J. Wong
  1 sibling, 1 reply; 7+ messages in thread
From: Darrick J. Wong @ 2018-08-07 15:10 UTC (permalink / raw)
  To: Marco Benatto; +Cc: linux-xfs

On Mon, Aug 06, 2018 at 06:10:32PM -0300, Marco Benatto wrote:
> A project quota inode was introduced into V5 superblock allowing
> project quotas and group quotas to be used simultaneously. However
> on "Quota Inodes" section we still mention it's not possible to
> use project and group quotas at sametime.
> 
> This patch documents this behavior for V5 and later superblocks,
> while keeps documented the old behavior for earlier versions.
> 
> Signed-off-by: Marco Benatto <mbenatto@redhat.com>

Looks ok,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

--D

> ---
>  design/XFS_Filesystem_Structure/internal_inodes.asciidoc | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/design/XFS_Filesystem_Structure/internal_inodes.asciidoc b/design/XFS_Filesystem_Structure/internal_inodes.asciidoc
> index f5c2654..b694e74 100644
> --- a/design/XFS_Filesystem_Structure/internal_inodes.asciidoc
> +++ b/design/XFS_Filesystem_Structure/internal_inodes.asciidoc
> @@ -8,9 +8,12 @@ accessible from the superblock.
>  [[Quota_Inodes]]
>  == Quota Inodes
>  
> -If quotas are used, two inodes are allocated for user and group quota
> -management. If project quotas are used, these replace the group quota management
> -and therefore uses the group quota inode.
> +If quotas are used, prior to version 5 superblocks, two inodes are allocated for
> +user and group management. In this case if project quotas are used, these replace
> +the group quota management and therefore uses the group quota inode.
> +
> +In version 5 superblock or later a third inode will be allocated to project quota
> +management, making it possible to use group and project quotas management simultaneously.
>  
>  * Project quota's primary purpose is to track and monitor disk usage for
>  directories. For this to occur, the directory inode must have the
> @@ -28,7 +31,7 @@ multiplied by the size of +xfs_dqblk_t+ (136 bytes).
>  .Quota inode layout
>  image::images/76.png[]
>  
> -Quota information is stored in the data extents of the two reserved quota
> +Quota information is stored in the data extents of the reserved quota
>  inodes as an array of the +xfs_dqblk+ structures, where there is one array
>  element for each ID in the system:
>  
> -- 
> 2.9.5
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] design: Document project quota inode
  2018-08-07 15:10 ` Darrick J. Wong
@ 2018-08-07 15:28   ` Darrick J. Wong
  2018-08-07 15:30     ` Marco Benatto
  2018-08-08 13:12     ` Carlos Maiolino
  0 siblings, 2 replies; 7+ messages in thread
From: Darrick J. Wong @ 2018-08-07 15:28 UTC (permalink / raw)
  To: Marco Benatto; +Cc: linux-xfs

On Tue, Aug 07, 2018 at 08:10:50AM -0700, Darrick J. Wong wrote:
> On Mon, Aug 06, 2018 at 06:10:32PM -0300, Marco Benatto wrote:
> > A project quota inode was introduced into V5 superblock allowing
> > project quotas and group quotas to be used simultaneously. However
> > on "Quota Inodes" section we still mention it's not possible to
> > use project and group quotas at sametime.
> > 
> > This patch documents this behavior for V5 and later superblocks,
> > while keeps documented the old behavior for earlier versions.
> > 
> > Signed-off-by: Marco Benatto <mbenatto@redhat.com>
> 
> Looks ok,
> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
> 
> --D
> 
> > ---
> >  design/XFS_Filesystem_Structure/internal_inodes.asciidoc | 11 +++++++----
> >  1 file changed, 7 insertions(+), 4 deletions(-)
> > 
> > diff --git a/design/XFS_Filesystem_Structure/internal_inodes.asciidoc b/design/XFS_Filesystem_Structure/internal_inodes.asciidoc
> > index f5c2654..b694e74 100644
> > --- a/design/XFS_Filesystem_Structure/internal_inodes.asciidoc
> > +++ b/design/XFS_Filesystem_Structure/internal_inodes.asciidoc
> > @@ -8,9 +8,12 @@ accessible from the superblock.
> >  [[Quota_Inodes]]
> >  == Quota Inodes
> >  
> > -If quotas are used, two inodes are allocated for user and group quota
> > -management. If project quotas are used, these replace the group quota management
> > -and therefore uses the group quota inode.
> > +If quotas are used, prior to version 5 superblocks, two inodes are allocated for
> > +user and group management. In this case if project quotas are used, these replace
> > +the group quota management and therefore uses the group quota inode.
> > +
> > +In version 5 superblock or later a third inode will be allocated to project quota
> > +management, making it possible to use group and project quotas management simultaneously.

Ugh, /me has post-review regrets... mind if I rearrange this a little?

"Prior to version 5 filesystems, two inodes can be allocated for quota
management.  The first inode will be used for user quotas.  The second
inode will be used for group quotas or project quotas, depending on
mount options.  Group and project quotas are mutually exclusive features
in these environments.

"In version 5 or later filesystems, each quota type is allocated its own
inode, making it possible to use group and project quota management
simultaneously."

--D

> >  
> >  * Project quota's primary purpose is to track and monitor disk usage for
> >  directories. For this to occur, the directory inode must have the
> > @@ -28,7 +31,7 @@ multiplied by the size of +xfs_dqblk_t+ (136 bytes).
> >  .Quota inode layout
> >  image::images/76.png[]
> >  
> > -Quota information is stored in the data extents of the two reserved quota
> > +Quota information is stored in the data extents of the reserved quota
> >  inodes as an array of the +xfs_dqblk+ structures, where there is one array
> >  element for each ID in the system:
> >  
> > -- 
> > 2.9.5
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] design: Document project quota inode
  2018-08-07 15:28   ` Darrick J. Wong
@ 2018-08-07 15:30     ` Marco Benatto
  2018-08-08 13:12     ` Carlos Maiolino
  1 sibling, 0 replies; 7+ messages in thread
From: Marco Benatto @ 2018-08-07 15:30 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: linux-xfs

>
> Ugh, /me has post-review regrets... mind if I rearrange this a little?
>
> "Prior to version 5 filesystems, two inodes can be allocated for quota
> management.  The first inode will be used for user quotas.  The second
> inode will be used for group quotas or project quotas, depending on
> mount options.  Group and project quotas are mutually exclusive features
> in these environments.
>
> "In version 5 or later filesystems, each quota type is allocated its own
> inode, making it possible to use group and project quota management
> simultaneously."
>
> --D
>

No problem at all, this way looks better to me.

Thanks!

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] design: Document project quota inode
  2018-08-07 15:28   ` Darrick J. Wong
  2018-08-07 15:30     ` Marco Benatto
@ 2018-08-08 13:12     ` Carlos Maiolino
  1 sibling, 0 replies; 7+ messages in thread
From: Carlos Maiolino @ 2018-08-08 13:12 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: Marco Benatto, linux-xfs

On Tue, Aug 07, 2018 at 08:28:06AM -0700, Darrick J. Wong wrote:
> On Tue, Aug 07, 2018 at 08:10:50AM -0700, Darrick J. Wong wrote:
> > On Mon, Aug 06, 2018 at 06:10:32PM -0300, Marco Benatto wrote:
> > > A project quota inode was introduced into V5 superblock allowing
> > > project quotas and group quotas to be used simultaneously. However
> > > on "Quota Inodes" section we still mention it's not possible to
> > > use project and group quotas at sametime.
> > > 
> > > This patch documents this behavior for V5 and later superblocks,
> > > while keeps documented the old behavior for earlier versions.
> > > 
> > > Signed-off-by: Marco Benatto <mbenatto@redhat.com>
> > 
> > Looks ok,
> > Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
> > 
> > --D
> > 
> > > ---
> > >  design/XFS_Filesystem_Structure/internal_inodes.asciidoc | 11 +++++++----
> > >  1 file changed, 7 insertions(+), 4 deletions(-)
> > > 
> > > diff --git a/design/XFS_Filesystem_Structure/internal_inodes.asciidoc b/design/XFS_Filesystem_Structure/internal_inodes.asciidoc
> > > index f5c2654..b694e74 100644
> > > --- a/design/XFS_Filesystem_Structure/internal_inodes.asciidoc
> > > +++ b/design/XFS_Filesystem_Structure/internal_inodes.asciidoc
> > > @@ -8,9 +8,12 @@ accessible from the superblock.
> > >  [[Quota_Inodes]]
> > >  == Quota Inodes
> > >  
> > > -If quotas are used, two inodes are allocated for user and group quota
> > > -management. If project quotas are used, these replace the group quota management
> > > -and therefore uses the group quota inode.
> > > +If quotas are used, prior to version 5 superblocks, two inodes are allocated for
> > > +user and group management. In this case if project quotas are used, these replace
> > > +the group quota management and therefore uses the group quota inode.
> > > +
> > > +In version 5 superblock or later a third inode will be allocated to project quota
> > > +management, making it possible to use group and project quotas management simultaneously.
> 
> Ugh, /me has post-review regrets... mind if I rearrange this a little?
> 
> "Prior to version 5 filesystems, two inodes can be allocated for quota
> management.  The first inode will be used for user quotas.  The second
> inode will be used for group quotas or project quotas, depending on
> mount options.  Group and project quotas are mutually exclusive features
> in these environments.
> 
> "In version 5 or later filesystems, each quota type is allocated its own
> inode, making it possible to use group and project quota management
> simultaneously."
> 

FWIW

Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>



> --D
> 
> > >  
> > >  * Project quota's primary purpose is to track and monitor disk usage for
> > >  directories. For this to occur, the directory inode must have the
> > > @@ -28,7 +31,7 @@ multiplied by the size of +xfs_dqblk_t+ (136 bytes).
> > >  .Quota inode layout
> > >  image::images/76.png[]
> > >  
> > > -Quota information is stored in the data extents of the two reserved quota
> > > +Quota information is stored in the data extents of the reserved quota
> > >  inodes as an array of the +xfs_dqblk+ structures, where there is one array
> > >  element for each ID in the system:
> > >  
> > > -- 
> > > 2.9.5
> > > 
> > > --
> > > To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> > > the body of a message to majordomo@vger.kernel.org
> > > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Carlos

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-08-08 15:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-06 21:10 [PATCH] design: Document project quota inode Marco Benatto
2018-08-07 11:17 ` Carlos Maiolino
2018-08-07 13:13   ` Marco Benatto
2018-08-07 15:10 ` Darrick J. Wong
2018-08-07 15:28   ` Darrick J. Wong
2018-08-07 15:30     ` Marco Benatto
2018-08-08 13:12     ` Carlos Maiolino

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).