Re: [PATCH 1/2] generic: per-type quota timers set/get test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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@xxxxxxxxxx>
>> ---
>>
>> 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



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux