From nobody Sat Oct 21 06:10:32 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SC9zs0w3wz4xYb1; Sat, 21 Oct 2023 06:10:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SC9zs0632z4W5C; Sat, 21 Oct 2023 06:10:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697868633; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7AtP2kkdb+tZprMTZQOqBACMlrrNyxz1mljFJKoiSYc=; b=gURV7wQiQF8GJOqe9N3Yr0qPLws3OR+Dpk+qwSy5qFdDUDUsa7BcFN2YtshVWWyQbBFmHh yPdsTEmkoDc8Liv3dNgV7vTy8kxGONfcYzg3vPGKxp+jgTB8kClXg4EQoeWz3l26mZrjJt IilJa2o191Ham2nPiZktpR0evd7BhtATt6O1lF1Ka3D8ISJjDdUxqHOYkK7kNvk2Uax31x kBMA9jJ71zBS4unpOyV1YuB3adftv5he1RJYBmjNHL4xGTACIRKP6Ti/gk2rpMGaTuTEYn WjIzg4QG/nZgwSc+WKxpolG72e3ErkCkjncZq6EORoVpRKxUZDu188Il3AkxAQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697868633; a=rsa-sha256; cv=none; b=hbvchQbrl2vcq96IxD7tUWZvNtIzZ2rlD3EtiQUKB/ARjsd57+sdg1J77RumCp5OMAg2Xh UwytE9WhsvOD+JqKgWz4Fh2ZVp3TSWXy+raU/uCnJQiD8iGg1BvdagzRv1Jky2FK2TlJgQ NBJ/vMddDnKm8kdxv/JXlvzQD/er3wVQ2FHlGOS8sZsA8G5/zvbJw6/04ZFRjWEVbg/UjO uIOyds5cSIYhSfhsvqwJLgfgspWsqzy8V0WWmMhA0O9peeG0woZu2exkm92OqdqrO4bRWC 8PnLW9uh/0gbQ5Q988aWdl6wev+fM2nxa4TZwZpEvP1ISnmwXE6sATAsYVPMvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697868633; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7AtP2kkdb+tZprMTZQOqBACMlrrNyxz1mljFJKoiSYc=; b=xrNrkewB4WREIdPTtlnj72pBnZoAzRUsM/fvn1XUl67qIMKXj1Zukv1uEPLfZISI4rkfsE huwufVTHR2mLdDi6OoPzY44AMOkgeaq1SoBhUoZYi53f+wm9u2LCKFyN5D2O8+t4SVbGK9 vBroorLBWZJ3wjUU0RmG5TpOaU8JDi4Kd9Cv5Q/+Diq5n2g4d2MaU7NSMqNgFVWkXh9B1g /voySnr49PXVuEWi1Yire4rNINnX3yqS4Mh1xsOqHIahmKptGb7aZLtbf8p8p0gYhYPNXx 1sF3dt/rxW4SX2NIls1F8dDOYhU5WSyNWgHnV0hudX40E+t7SFFjjryD4CKOGw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SC9zr6GWYz14Jp; Sat, 21 Oct 2023 06:10:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39L6AWNj050352; Sat, 21 Oct 2023 06:10:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39L6AWUh050349; Sat, 21 Oct 2023 06:10:32 GMT (envelope-from git) Date: Sat, 21 Oct 2023 06:10:32 GMT Message-Id: <202310210610.39L6AWUh050349@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 2fee3974603b - main - ufs quotas: fix configuring soft quota grace time List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2fee3974603bce6f2dc153eb6af459cb4f864ab4 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=2fee3974603bce6f2dc153eb6af459cb4f864ab4 commit 2fee3974603bce6f2dc153eb6af459cb4f864ab4 Author: Mikel Lechner AuthorDate: 2023-10-21 06:08:38 +0000 Commit: Konstantin Belousov 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(-) diff --git a/sys/ufs/ufs/ufs_quota.c b/sys/ufs/ufs/ufs_quota.c index 8f77fb3a95d2..78f539bcabd2 100644 --- a/sys/ufs/ufs/ufs_quota.c +++ b/sys/ufs/ufs/ufs_quota.c @@ -580,6 +580,15 @@ quotaon(struct thread *td, struct mount *mp, int type, void *fname, VN_LOCK_DSHARE(vp); VOP_UNLOCK(vp); *vpp = vp; + + /* + * Allow the getdq from getinoquota below to read the quota + * from file. + */ + UFS_LOCK(ump); + ump->um_qflags[type] &= ~QTF_CLOSING; + UFS_UNLOCK(ump); + /* * Save the credential of the process that turned on quotas. * Set up the time limits for this quota. @@ -594,13 +603,6 @@ quotaon(struct thread *td, struct mount *mp, int type, void *fname, ump->um_itime[type] = dq->dq_itime; dqrele(NULLVP, dq); } - /* - * Allow the getdq from getinoquota below to read the quota - * from file. - */ - UFS_LOCK(ump); - ump->um_qflags[type] &= ~QTF_CLOSING; - UFS_UNLOCK(ump); /* * Search vnodes associated with this mount point, * adding references to quota file being opened.