public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs: send warning of project quota to userspace via netlink
@ 2015-11-25  8:52 Masatake YAMATO
  2015-11-25 18:54 ` Brian Foster
  0 siblings, 1 reply; 8+ messages in thread
From: Masatake YAMATO @ 2015-11-25  8:52 UTC (permalink / raw)
  To: xfs; +Cc: yamato

Linux's quota subsystem has an ability to handle
project quota. This commit just utilizes the ability
from xfs side.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
---
 fs/xfs/xfs_trans_dquot.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/fs/xfs/xfs_trans_dquot.c b/fs/xfs/xfs_trans_dquot.c
index ce78534..1a46544 100644
--- a/fs/xfs/xfs_trans_dquot.c
+++ b/fs/xfs/xfs_trans_dquot.c
@@ -572,12 +572,17 @@ xfs_quota_warn(
 	struct xfs_dquot	*dqp,
 	int			type)
 {
-	/* no warnings for project quotas - we just return ENOSPC later */
+	enum quota_type t;
+
 	if (dqp->dq_flags & XFS_DQ_PROJ)
-		return;
+		t = PRJQUOTA;
+	else if (dqp->dq_flags & XFS_DQ_USER)
+		t = USRQUOTA;
+	else
+		t = GRPQUOTA;
+
 	quota_send_warning(make_kqid(&init_user_ns,
-				     (dqp->dq_flags & XFS_DQ_USER) ?
-				     USRQUOTA : GRPQUOTA,
+				     t,
 				     be32_to_cpu(dqp->q_core.d_id)),
 			   mp->m_super->s_dev, type);
 }
-- 
2.5.0

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-12-17  2:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-25  8:52 [PATCH] xfs: send warning of project quota to userspace via netlink Masatake YAMATO
2015-11-25 18:54 ` Brian Foster
2015-11-26  2:22   ` [PATCH v2] " Masatake YAMATO
2015-11-26 13:49     ` Brian Foster
2015-12-17  2:09       ` Masatake YAMATO
2015-11-26  2:34   ` Masatake YAMATO
2015-11-26  2:34     ` Masatake YAMATO
2015-11-26  2:40       ` Masatake YAMATO

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox