Commit ffc671f1 authored by Masatake YAMATO's avatar Masatake YAMATO Committed by Dave Chinner

xfs: send warning of project quota to userspace via netlink

Linux's quota subsystem has an ability to handle project quota. This
commit just utilizes the ability from xfs side.  dbus-monitor and
quota_nld shipped as part of quota-tools can be used for testing.
See the patch posting on the XFS list for details on testing.
Signed-off-by: default avatarMasatake YAMATO <yamato@redhat.com>
Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
parent f1f96c49
...@@ -572,12 +572,16 @@ xfs_quota_warn( ...@@ -572,12 +572,16 @@ xfs_quota_warn(
struct xfs_dquot *dqp, struct xfs_dquot *dqp,
int type) int type)
{ {
/* no warnings for project quotas - we just return ENOSPC later */ enum quota_type qtype;
if (dqp->dq_flags & XFS_DQ_PROJ) if (dqp->dq_flags & XFS_DQ_PROJ)
return; qtype = PRJQUOTA;
quota_send_warning(make_kqid(&init_user_ns, else if (dqp->dq_flags & XFS_DQ_USER)
(dqp->dq_flags & XFS_DQ_USER) ? qtype = USRQUOTA;
USRQUOTA : GRPQUOTA, else
qtype = GRPQUOTA;
quota_send_warning(make_kqid(&init_user_ns, qtype,
be32_to_cpu(dqp->q_core.d_id)), be32_to_cpu(dqp->q_core.d_id)),
mp->m_super->s_dev, type); mp->m_super->s_dev, type);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment