public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* XFS group quota incorrectly "inherits" its hard limit from user 0
@ 2017-07-18 21:51 Yaron Presente
  2017-07-18 22:56 ` Dave Chinner
  2017-07-19 15:34 ` Eric Sandeen
  0 siblings, 2 replies; 5+ messages in thread
From: Yaron Presente @ 2017-07-18 21:51 UTC (permalink / raw)
  To: linux-xfs

Hi,
I'm running a Linux system with kernel version 3.18.19.
While experimenting with groups quota, I did the following steps:

1. Mounted XFS with both users and groups quota enabled
2. Set user 0 (aka the SuperUser) hard limit to 800000 . I believe
that this has the same affect as using xfs_quota limit command with
"-d" (i.e. setting the default hard limit for users which don't have
their hard limit set explicitly)
3. Set user 2001117 hard limit to 1024000 (I set a different limit
than user 0's on purpose, in order to show that the group hard limit
was not inherited from this user, but from user 0)
4. Created a 1MB file that is owned by user 2001117 and group 2000514
5. Group 2000514 which previously didn't have any hard limit defined
now "inherited" user 0 hard limit of 800000 .

See output of xfs_quota below.
Thanks,
Yaron


Before creating the file:
==================

root@vsa-0000011e-vc-0:~# xfs_quota -x -c "report -L0 -U 2100000"
/export/share_3
User quota on /export/share_3 (/dev/dm-28)
                               Blocks
User ID          Used       Soft       Hard    Warn/Grace
---------- --------------------------------------------------
#0                  0               0      800000      00  [--------]
#2001117       0               0     1024000     00 [--------]

Group quota on /export/share_3 (/dev/dm-28)
                               Blocks
Group ID         Used       Soft       Hard    Warn/Grace
---------- --------------------------------------------------
#0                  0               0          0          00 [--------]

(group 2000514  is not listed since it does not have a hard limit and
its quota is not used by any file)

After creating the file:
================

root@vsa-0000011e-vc-0:~# xfs_quota -x -c "report -L0 -U 2100000"
/export/share_3
User quota on /export/share_3 (/dev/dm-28)
                               Blocks
User ID          Used       Soft       Hard    Warn/Grace
---------- --------------------------------------------------
#0                  0               0     800000      00  [--------]
#2001117      1024         0    1024000     00 [--------]

Group quota on /export/share_3 (/dev/dm-28)
                               Blocks
Group ID         Used       Soft       Hard    Warn/Grace
---------- --------------------------------------------------
#0                  0               0          0           00 [--------]
#2000514      1024         0      800000     00 [--------]
   <===   This is the problem. It's not clear where this hard limit
came from

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

end of thread, other threads:[~2017-07-20  7:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-18 21:51 XFS group quota incorrectly "inherits" its hard limit from user 0 Yaron Presente
2017-07-18 22:56 ` Dave Chinner
2017-07-19  5:54   ` Yaron Presente
2017-07-19 15:34 ` Eric Sandeen
2017-07-20  7:08   ` Yaron Presente

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox