quota: implement sending information via netlink about user below quota

Sometimes it may be useful for userspace to know (e.g.  for some hosting
guys) that some user stopped exceeding his hardlimit or softlimit in
quotas.  Implement sending of such events to userspace via quota netlink
protocol so that they don't have to poll for such events.  Based on idea
and initial implementation by Vladislav Bogdanov.

Cc: Vladislav Bogdanov <slava@nsys.by>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Jan Kara
2008-07-25 01:46:52 -07:00
committed by Linus Torvalds
parent 03b063436c
commit 657d3bfa98
2 changed files with 58 additions and 6 deletions

View File

@@ -135,6 +135,10 @@ struct if_dqinfo {
#define QUOTA_NL_BHARDWARN 4 /* Block hardlimit reached */
#define QUOTA_NL_BSOFTLONGWARN 5 /* Block grace time expired */
#define QUOTA_NL_BSOFTWARN 6 /* Block softlimit reached */
#define QUOTA_NL_IHARDBELOW 7 /* Usage got below inode hardlimit */
#define QUOTA_NL_ISOFTBELOW 8 /* Usage got below inode softlimit */
#define QUOTA_NL_BHARDBELOW 9 /* Usage got below block hardlimit */
#define QUOTA_NL_BSOFTBELOW 10 /* Usage got below block softlimit */
enum {
QUOTA_NL_C_UNSPEC,