All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Catherine Hoang <catherine.hoang@oracle.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [RFC PATCH v1 2/2] xfs: don't set warns on the id==0 dquot
Date: Wed, 27 Apr 2022 13:29:43 -0700	[thread overview]
Message-ID: <20220427202943.GL17025@magnolia> (raw)
In-Reply-To: <20220421165815.87837-3-catherine.hoang@oracle.com>

On Thu, Apr 21, 2022 at 09:58:15AM -0700, Catherine Hoang wrote:
> Quotas are not enforced on the id==0 dquot, so the quota code uses it
> to store warning limits and timeouts.  Having just dropped support for
> warning limits, this field no longer has any meaning.  Return -EINVAL
> for this dquot id if the fieldmask has any of the QC_*_WARNS set.
> 
> Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com>
> ---
>  fs/xfs/xfs_qm_syscalls.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/fs/xfs/xfs_qm_syscalls.c b/fs/xfs/xfs_qm_syscalls.c
> index e7f3ac60ebd9..bdbd5c83b08e 100644
> --- a/fs/xfs/xfs_qm_syscalls.c
> +++ b/fs/xfs/xfs_qm_syscalls.c
> @@ -290,6 +290,8 @@ xfs_qm_scall_setqlim(
>  		return -EINVAL;
>  	if ((newlim->d_fieldmask & XFS_QC_MASK) == 0)
>  		return 0;
> +	if ((newlim->d_fieldmask & QC_WARNS_MASK) && id == 0)
> +		return -EINVAL;

Assuming there'll be more patches coming to turn off the rest of the
warnings counters, this is a reasonable start:

Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

>  
>  	/*
>  	 * Get the dquot (locked) before we start, as we need to do a
> -- 
> 2.27.0
> 

  parent reply	other threads:[~2022-04-27 20:30 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-21 16:58 [PATCH v1 0/2] xfs: remove quota warning limits Catherine Hoang
2022-04-21 16:58 ` [PATCH v1 1/2] xfs: remove quota warning limit from struct xfs_quota_limits Catherine Hoang
2022-04-27 18:47   ` Alli
2022-04-27 20:29   ` Darrick J. Wong
2022-04-21 16:58 ` [RFC PATCH v1 2/2] xfs: don't set warns on the id==0 dquot Catherine Hoang
2022-04-22  1:40   ` Dave Chinner
2022-04-25 15:34     ` Catherine Hoang
2022-04-25 22:42       ` Dave Chinner
2022-04-29 17:20         ` Alli
2022-04-29 19:38           ` Darrick J. Wong
2022-04-27 20:29   ` Darrick J. Wong [this message]
2022-04-28  6:36   ` [xfs] 3937433c63: xfstests.xfs.153.fail kernel test robot
2022-04-28  6:36     ` kernel test robot
2022-04-25 18:19 ` [PATCH v1 0/2] xfs: remove quota warning limits Eric Sandeen
2022-04-25 22:21   ` Dave Chinner
2022-04-26  2:43     ` Darrick J. Wong
2022-04-26  4:29       ` Dave Chinner
2022-04-26  5:14         ` Darrick J. Wong
2022-04-26 14:15       ` Brian Foster
2022-04-26 14:53         ` Darrick J. Wong
2022-04-26 18:32           ` Brian Foster
2022-04-27 14:09             ` Brian Foster

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=20220427202943.GL17025@magnolia \
    --to=djwong@kernel.org \
    --cc=catherine.hoang@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.