xfs
[Top] [All Lists]

Re: [PATCH v2] xfs: send warning of project quota to userspace via netli

To: Masatake YAMATO <yamato@xxxxxxxxxx>
Subject: Re: [PATCH v2] xfs: send warning of project quota to userspace via netlink
From: Brian Foster <bfoster@xxxxxxxxxx>
Date: Thu, 26 Nov 2015 08:49:33 -0500
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1448504560-25151-1-git-send-email-yamato@xxxxxxxxxx>
References: <20151125185419.GA18719@xxxxxxxxxxxxxxx> <1448504560-25151-1-git-send-email-yamato@xxxxxxxxxx>
User-agent: Mutt/1.5.23 (2014-03-12)
On Thu, Nov 26, 2015 at 11:22:39AM +0900, Masatake YAMATO wrote:
> Linux's quota subsystem has an ability to handle
> project quota. This commit just utilizes the ability
> from xfs side.
> 
...
> Changes in v2:
> 
>       a couple aesthetic things suggested by Brian Foster 
> <bfoster@xxxxxxxxxx>.
>       * rename local vairable for aligning the parameter names,
>       * move a short line to the end of its previous line.
> 
> Signed-off-by: Masatake YAMATO <yamato@xxxxxxxxxx>
> ---

Thanks for all of the test information. Now you have a really long
commit log description rather than a short one. ;) Maybe Dave can
truncate it. Regardless, looks fine to me:

Reviewed-by: Brian Foster <bfoster@xxxxxxxxxx>

>  fs/xfs/xfs_trans_dquot.c | 14 +++++++++-----
>  1 file changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/fs/xfs/xfs_trans_dquot.c b/fs/xfs/xfs_trans_dquot.c
> index ce78534..9951701 100644
> --- a/fs/xfs/xfs_trans_dquot.c
> +++ b/fs/xfs/xfs_trans_dquot.c
> @@ -572,12 +572,16 @@ xfs_quota_warn(
>       struct xfs_dquot        *dqp,
>       int                     type)
>  {
> -     /* no warnings for project quotas - we just return ENOSPC later */
> +     enum quota_type qtype;
> +
>       if (dqp->dq_flags & XFS_DQ_PROJ)
> -             return;
> -     quota_send_warning(make_kqid(&init_user_ns,
> -                                  (dqp->dq_flags & XFS_DQ_USER) ?
> -                                  USRQUOTA : GRPQUOTA,
> +             qtype = PRJQUOTA;
> +     else if (dqp->dq_flags & XFS_DQ_USER)
> +             qtype = USRQUOTA;
> +     else
> +             qtype = GRPQUOTA;
> +
> +     quota_send_warning(make_kqid(&init_user_ns, qtype,
>                                    be32_to_cpu(dqp->q_core.d_id)),
>                          mp->m_super->s_dev, type);
>  }
> -- 
> 2.5.0
> 
> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs

<Prev in Thread] Current Thread [Next in Thread>