diff options
author | Jan Kara <jack@suse.cz> | 2007-10-17 02:29:31 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-17 11:42:56 -0400 |
commit | 8e8934695dfd1d5013555a74a9da706a2e301cb0 (patch) | |
tree | edef65302982cbd3e18cf4ef3c88040939886e3a /include/linux/quota.h | |
parent | fac8b209b1084bc85748bd54e13d00c1262b220f (diff) |
quota: send messages via netlink
Implement sending of quota messages via netlink interface. The advantage
is that in userspace we can better decide what to do with the message - for
example display a dialogue in your X session or just write the message to
the console. As a bonus, we can get rid of problems with console locking
deep inside filesystem code once we remove the old printing mechanism.
Signed-off-by: Jan Kara <jack@suse.cz>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/quota.h')
-rw-r--r-- | include/linux/quota.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/include/linux/quota.h b/include/linux/quota.h index 62439828395e..6e0393a5b2ea 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h | |||
@@ -128,6 +128,37 @@ struct if_dqinfo { | |||
128 | __u32 dqi_valid; | 128 | __u32 dqi_valid; |
129 | }; | 129 | }; |
130 | 130 | ||
131 | /* | ||
132 | * Definitions for quota netlink interface | ||
133 | */ | ||
134 | #define QUOTA_NL_NOWARN 0 | ||
135 | #define QUOTA_NL_IHARDWARN 1 /* Inode hardlimit reached */ | ||
136 | #define QUOTA_NL_ISOFTLONGWARN 2 /* Inode grace time expired */ | ||
137 | #define QUOTA_NL_ISOFTWARN 3 /* Inode softlimit reached */ | ||
138 | #define QUOTA_NL_BHARDWARN 4 /* Block hardlimit reached */ | ||
139 | #define QUOTA_NL_BSOFTLONGWARN 5 /* Block grace time expired */ | ||
140 | #define QUOTA_NL_BSOFTWARN 6 /* Block softlimit reached */ | ||
141 | |||
142 | enum { | ||
143 | QUOTA_NL_C_UNSPEC, | ||
144 | QUOTA_NL_C_WARNING, | ||
145 | __QUOTA_NL_C_MAX, | ||
146 | }; | ||
147 | #define QUOTA_NL_C_MAX (__QUOTA_NL_C_MAX - 1) | ||
148 | |||
149 | enum { | ||
150 | QUOTA_NL_A_UNSPEC, | ||
151 | QUOTA_NL_A_QTYPE, | ||
152 | QUOTA_NL_A_EXCESS_ID, | ||
153 | QUOTA_NL_A_WARNING, | ||
154 | QUOTA_NL_A_DEV_MAJOR, | ||
155 | QUOTA_NL_A_DEV_MINOR, | ||
156 | QUOTA_NL_A_CAUSED_ID, | ||
157 | __QUOTA_NL_A_MAX, | ||
158 | }; | ||
159 | #define QUOTA_NL_A_MAX (__QUOTA_NL_A_MAX - 1) | ||
160 | |||
161 | |||
131 | #ifdef __KERNEL__ | 162 | #ifdef __KERNEL__ |
132 | #include <linux/spinlock.h> | 163 | #include <linux/spinlock.h> |
133 | #include <linux/rwsem.h> | 164 | #include <linux/rwsem.h> |