aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/dqblk_v1.h6
-rw-r--r--include/linux/dqblk_v2.h6
-rw-r--r--include/linux/quota.h7
3 files changed, 17 insertions, 2 deletions
diff --git a/include/linux/dqblk_v1.h b/include/linux/dqblk_v1.h
index 42fbf4797156..57f1250d5a52 100644
--- a/include/linux/dqblk_v1.h
+++ b/include/linux/dqblk_v1.h
@@ -11,6 +11,12 @@
11/* Root squash turned on */ 11/* Root squash turned on */
12#define V1_DQF_RSQUASH 1 12#define V1_DQF_RSQUASH 1
13 13
14/* Numbers of blocks needed for updates */
15#define V1_INIT_ALLOC 1
16#define V1_INIT_REWRITE 1
17#define V1_DEL_ALLOC 0
18#define V1_DEL_REWRITE 2
19
14/* Special information about quotafile */ 20/* Special information about quotafile */
15struct v1_mem_dqinfo { 21struct v1_mem_dqinfo {
16}; 22};
diff --git a/include/linux/dqblk_v2.h b/include/linux/dqblk_v2.h
index 4a6c5f6867bb..4f853322cb7f 100644
--- a/include/linux/dqblk_v2.h
+++ b/include/linux/dqblk_v2.h
@@ -10,6 +10,12 @@
10/* id numbers of quota format */ 10/* id numbers of quota format */
11#define QFMT_VFS_V0 2 11#define QFMT_VFS_V0 2
12 12
13/* Numbers of blocks needed for updates */
14#define V2_INIT_ALLOC 4
15#define V2_INIT_REWRITE 2
16#define V2_DEL_ALLOC 0
17#define V2_DEL_REWRITE 6
18
13/* Inmemory copy of version specific information */ 19/* Inmemory copy of version specific information */
14struct v2_mem_dqinfo { 20struct v2_mem_dqinfo {
15 unsigned int dqi_blocks; 21 unsigned int dqi_blocks;
diff --git a/include/linux/quota.h b/include/linux/quota.h
index ac5b90f4f256..700ead45084f 100644
--- a/include/linux/quota.h
+++ b/include/linux/quota.h
@@ -138,8 +138,11 @@ struct if_dqinfo {
138#include <linux/dqblk_v2.h> 138#include <linux/dqblk_v2.h>
139 139
140/* Maximal numbers of writes for quota operation (insert/delete/update) 140/* Maximal numbers of writes for quota operation (insert/delete/update)
141 * (over all formats) - info block, 4 pointer blocks, data block */ 141 * (over VFS all formats) */
142#define DQUOT_MAX_WRITES 6 142#define DQUOT_INIT_ALLOC max(V1_INIT_ALLOC, V2_INIT_ALLOC)
143#define DQUOT_INIT_REWRITE max(V1_INIT_REWRITE, V2_INIT_REWRITE)
144#define DQUOT_DEL_ALLOC max(V1_DEL_ALLOC, V2_DEL_ALLOC)
145#define DQUOT_DEL_REWRITE max(V1_DEL_REWRITE, V2_DEL_REWRITE)
143 146
144/* 147/*
145 * Data for one user/group kept in memory 148 * Data for one user/group kept in memory