summaryrefslogtreecommitdiff
path: root/include/linux/quota.h
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2008-10-01 18:21:39 +0200
committerMark Fasheh <mfasheh@suse.com>2009-01-05 08:40:21 -0800
commitdb49d2df489f727096438706a5428115e84a3f0d (patch)
tree4ba9837a5371bb4a84dc27614eaeb4e4772e3eb8 /include/linux/quota.h
parente3d4d56b9715e40ded2a84d0d4fa7f3b6c58983c (diff)
downloadlwn-db49d2df489f727096438706a5428115e84a3f0d.tar.gz
lwn-db49d2df489f727096438706a5428115e84a3f0d.zip
quota: Allow negative usage of space and inodes
For clustered filesystems, it can happen that space / inode usage goes negative temporarily (because some node is allocating another node is freeing and they are not completely in sync). So let quota code allow this and change qsize_t so a signed type so that we don't underflow the variables. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'include/linux/quota.h')
-rw-r--r--include/linux/quota.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/quota.h b/include/linux/quota.h
index e51dfdc0aef0..75bf761caef2 100644
--- a/include/linux/quota.h
+++ b/include/linux/quota.h
@@ -168,7 +168,7 @@ enum {
#include <asm/atomic.h>
typedef __kernel_uid32_t qid_t; /* Type in which we store ids in memory */
-typedef __u64 qsize_t; /* Type in which we store sizes */
+typedef long long qsize_t; /* Type in which we store sizes */
extern spinlock_t dq_data_lock;
@@ -336,6 +336,7 @@ enum {
* responsible for setting
* S_NOQUOTA, S_NOATIME flags
*/
+#define DQUOT_NEGATIVE_USAGE (1 << 7) /* Allow negative quota usage */
static inline unsigned int dquot_state_flag(unsigned int flags, int type)
{