Created attachment 245708 [details] Clear QTF_CLOSING flag before call to dqget() in quotaon(). Setting soft quota time limits with "edquota -t" has no effect on the quota system. The settings are stored in the quota.user file, but the soft quota grace period is unchanged at 7 days. I found the problem in "ufs/ufs/ufs_quota.c" where it attempts to load the quota record for id == 0 to set the value in ump->um_quotas[], but fails to load that quota record due to flags set in ump->um_qflags. A fix for the problem is included as an attached diff that moves the clearing of the QTF_CLOSING flag a few lines earlier to allow call to dqget() to work.
Konstantin, this looks like a regression from commit 088ffd20860de: the dqget() call unconditionally fails if QTF_CLOSING is set, so the patch makes some sense to me.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=2fee3974603bce6f2dc153eb6af459cb4f864ab4 commit 2fee3974603bce6f2dc153eb6af459cb4f864ab4 Author: Mikel Lechner <mikel@svpal.org> AuthorDate: 2023-10-21 06:08:38 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2023-10-21 06:08:38 +0000 ufs quotas: fix configuring soft quota grace time The QTF_CLOSING flag needs to be cleared earlier to allow dqget() to work. PR: 274552 MFC after: 1 week sys/ufs/ufs/ufs_quota.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=6ce903e8a8a78cea2b8ff269c5accbf5529e3045 commit 6ce903e8a8a78cea2b8ff269c5accbf5529e3045 Author: Mikel Lechner <mikel@svpal.org> AuthorDate: 2023-10-21 06:08:38 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2023-10-28 04:44:44 +0000 ufs quotas: fix configuring soft quota grace time PR: 274552 (cherry picked from commit 2fee3974603bce6f2dc153eb6af459cb4f864ab4) sys/ufs/ufs/ufs_quota.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)