From: Eric Sandeen <sandeen@sandeen.net>
To: Zorro Lang <zlang@redhat.com>, fstests@vger.kernel.org
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/2] generic: per-type quota timers set/get test
Date: Tue, 18 Feb 2020 15:44:43 -0600 [thread overview]
Message-ID: <af69203a-3e6f-31a3-d083-acd1f6654fbb@sandeen.net> (raw)
In-Reply-To: <01255cda-adee-1f0d-8e35-62d3b39813b5@sandeen.net>
On 2/18/20 3:41 PM, Eric Sandeen wrote:
> On 2/16/20 12:16 PM, Zorro Lang wrote:
>> Set different grace time, make sure each of quota (user, group and
>> project) timers can be set (by setquota) and get (by repquota)
>> correctly.
>>
>> Signed-off-by: Zorro Lang <zlang@redhat.com>
>> ---
>>
>> Hi,
>>
>> This case test passed on ext4, but on XFS (xfs-linux for-next branch with
>> Eric's patchset: [PATCH 0/4] xfs: enable per-type quota timers and warn limits)
>> I got below different output:
>
> *sigh* I wish we didn't have so many different quota tools & interfaces.
>
> Behold:
>
> # export MIN=60
> # setquota -t -g $((30 * MIN)) $((40 * MIN)) /mnt/scratch
>
>
> # ./repquota -g /mnt/scratch
> *** Report for group quotas on device /dev/pmem0p2
> Block grace time: 00:00; Inode grace time: 00:00
> ...
>
>
> # xfs_quota -x -c "state -g" /mnt/scratch
> Group quota state on /mnt/scratch (/dev/pmem0p2)
> Accounting: ON
> Enforcement: ON
> Inode: #132 (1 blocks, 1 extents)
> Blocks grace time: [0 days 00:30:00]
> Inodes grace time: [0 days 00:40:00]
> Realtime Blocks grace time: [--------]
>
> seems like this may actually be a bug in the quota/repquota code, trying to dig through
> that now.
>
> repquota actually calls & gets group quota grace, but perhaps it gets overwritten with the subsequent call for the (empty) user quota:
>
> # strace -v -e quotactl ./repquota -g /mnt/scratch 2>&1 | grep "STAT|"
> quotactl(Q_XGETQSTAT|USRQUOTA, "/dev/pmem0p2", 0, {version=1, flags=XFS_QUOTA_UDQ_ACCT|XFS_QUOTA_UDQ_ENFD|XFS_QUOTA_GDQ_ACCT|XFS_QUOTA_GDQ_ENFD, incoredqs=60, u_ino=131, u_nblks=1, u_nextents=1, g_ino=132, g_nblks=1, g_nextents=1, btimelimit=0, itimelimit=0, rtbtimelimit=0, bwarnlimit=0, iwarnlimit=0}) = 0
> quotactl(Q_XGETQSTAT|GRPQUOTA, "/dev/pmem0p2", 0, {version=1, flags=XFS_QUOTA_UDQ_ACCT|XFS_QUOTA_UDQ_ENFD|XFS_QUOTA_GDQ_ACCT|XFS_QUOTA_GDQ_ENFD, incoredqs=60, u_ino=131, u_nblks=1, u_nextents=1, g_ino=132, g_nblks=1, g_nextents=1, btimelimit=1800, itimelimit=2400, rtbtimelimit=0, bwarnlimit=0, iwarnlimit=0}) = 0
> quotactl(Q_XGETQSTAT|PRJQUOTA, "/dev/pmem0p2", 0, {version=1, flags=XFS_QUOTA_UDQ_ACCT|XFS_QUOTA_UDQ_ENFD|XFS_QUOTA_GDQ_ACCT|XFS_QUOTA_GDQ_ENFD, incoredqs=60, u_ino=131, u_nblks=1, u_nextents=1, g_ino=132, g_nblks=1, g_nextents=1, btimelimit=0, itimelimit=0, rtbtimelimit=0, bwarnlimit=0, iwarnlimit=0}) = 0
> quotactl(Q_XGETQSTAT|USRQUOTA, "/dev/pmem0p2", 0, {version=1, flags=XFS_QUOTA_UDQ_ACCT|XFS_QUOTA_UDQ_ENFD|XFS_QUOTA_GDQ_ACCT|XFS_QUOTA_GDQ_ENFD, incoredqs=60, u_ino=131, u_nblks=1, u_nextents=1, g_ino=132, g_nblks=1, g_nextents=1, btimelimit=0, itimelimit=0, rtbtimelimit=0, bwarnlimit=0, iwarnlimit=0}) = 0
>
> but why doesn't this happen for ext4 ...
... because on ext4, it makes different quotactl calls... of course :( :
quotactl(Q_GETINFO|GRPQUOTA, "/dev/pmem0p2", 0, {bgrace=1800, igrace=2400, flags=0, valid=IIF_BGRACE|IIF_IGRACE|IIF_FLAGS}) = 0
-Eric
next prev parent reply other threads:[~2020-02-18 21:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-16 18:16 [PATCH 1/2] generic: per-type quota timers set/get test Zorro Lang
2020-02-16 18:16 ` [PATCH 2/2] generic: test per-type quota softlimit enforcement timeout Zorro Lang
2020-02-18 21:09 ` [PATCH 1/2] generic: per-type quota timers set/get test Eric Sandeen
2020-02-18 21:41 ` Eric Sandeen
2020-02-18 21:44 ` Eric Sandeen [this message]
2020-02-18 22:02 ` Eric Sandeen
2020-02-20 2:57 ` Eric Sandeen
2020-02-20 4:15 ` Zorro Lang
[not found] ` <605d6c45-9f52-ec84-df01-d5b7665d16dc@sandeen.net>
2020-02-20 5:05 ` Zorro Lang
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=af69203a-3e6f-31a3-d083-acd1f6654fbb@sandeen.net \
--to=sandeen@sandeen.net \
--cc=fstests@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=zlang@redhat.com \
/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).