[LU-12692] The maximum quota grace time check is wrong Created: 26/Aug/19  Updated: 26/Aug/19

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.12.2
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Tatsushi Takamura Assignee: Tatsushi Takamura
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Related
is related to LU-12280 Provide option to disable soft quota ... Resolved
Epic/Theme: Quota
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

According to the the help message, The maximum quota grace time seems to be 2^48 - 1 seconds. But, the upper limit is checked by UINT_MAX. It should be checked by LQUOTA_GRACE_MAX.

lustre/utils/lfs.c

int lfs_setquota_times(int argc, char **argv)
{
<snip>
 if ((dqb->dqb_valid | QIF_BTIME && dqi->dqi_bgrace >= UINT_MAX) ||
 (dqb->dqb_valid | QIF_ITIME && dqi->dqi_igrace >= UINT_MAX)) {

 

# lfs setquota -t -u --block-grace 281474976710655 /lustre/
error: grace time is too large

 



 Comments   
Comment by Gerrit Updater [ 26/Aug/19 ]

Tatsushi Takamura (takamr.tatsushi@jp.fujitsu.com) uploaded a new patch: https://review.whamcloud.com/35915
Subject: LU-12692 quota: the maximum quota grace time check is wrong
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 68736c30fb853ffe08e07e2a56a3511244e2f444

Comment by Andreas Dilger [ 26/Aug/19 ]

Thank you for your patch.

It may be useful to also fix LU-12280 so that specifying "-1" (or possibly anything larger than 2^48-1) as the grace period is mapped to 2^48-1 in lfs_setquota_times(). This would make the "lfs quota" interface easier for administrators to use.

Generated at Sat Feb 10 02:54:49 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.