From 50dd12cfdbffea08b01a95ebfbc6eeb1d648c592 Mon Sep 17 00:00:00 2001 From: Masatake YAMATO Date: Wed, 16 Dec 2015 18:10:00 +0100 Subject: quota_nld: multicast project quota warnings via dbus Quota subsystem in kernel introduced project quota. This patch improves the userspace side. This patch prevents quota_nld writing warnings to a console when receiving project quota warnings from kernel because there is no such concept, "console associated with a project id". Signed-off-by: Masatake YAMATO Signed-off-by: Jan Kara --- quota.h | 1 + quota_nld.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/quota.h b/quota.h index 6787eab..0c38427 100644 --- a/quota.h +++ b/quota.h @@ -11,6 +11,7 @@ typedef int64_t qsize_t; /* Type in which we store size limitations */ #define MAXQUOTAS 2 #define USRQUOTA 0 /* element used for user quotas */ #define GRPQUOTA 1 /* element used for group quotas */ +#define PRJQUOTA 2 /* element used for project quotas */ /* * Definitions for the default names of the quotas files. diff --git a/quota_nld.c b/quota_nld.c index ad5c57e..ea541e0 100644 --- a/quota_nld.c +++ b/quota_nld.c @@ -165,7 +165,7 @@ static int quota_nl_parser(struct nl_msg *msg, void *arg) warn.dev_minor = nla_get_u32(attrs[QUOTA_NL_A_DEV_MINOR]); warn.caused_id = nla_get_u64(attrs[QUOTA_NL_A_CAUSED_ID]); - if (!(flags & FL_NOCONSOLE)) + if (!(flags & FL_NOCONSOLE) && warn.qtype != PRJQUOTA) write_console_warning(&warn); if (!(flags & FL_NODBUS)) write_dbus_warning(dhandle, &warn); -- cgit v1.2.3