diff options
Diffstat (limited to 'include/linux/quota.h')
-rw-r--r-- | include/linux/quota.h | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/include/linux/quota.h b/include/linux/quota.h index 78c48895b12a..a6861f117480 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h | |||
@@ -73,6 +73,8 @@ | |||
73 | /* Quota format type IDs */ | 73 | /* Quota format type IDs */ |
74 | #define QFMT_VFS_OLD 1 | 74 | #define QFMT_VFS_OLD 1 |
75 | #define QFMT_VFS_V0 2 | 75 | #define QFMT_VFS_V0 2 |
76 | #define QFMT_OCFS2 3 | ||
77 | #define QFMT_VFS_V1 4 | ||
76 | 78 | ||
77 | /* Size of block in which space limits are passed through the quota | 79 | /* Size of block in which space limits are passed through the quota |
78 | * interface */ | 80 | * interface */ |
@@ -313,8 +315,9 @@ struct dquot_operations { | |||
313 | int (*claim_space) (struct inode *, qsize_t); | 315 | int (*claim_space) (struct inode *, qsize_t); |
314 | /* release rsved quota for delayed alloc */ | 316 | /* release rsved quota for delayed alloc */ |
315 | void (*release_rsv) (struct inode *, qsize_t); | 317 | void (*release_rsv) (struct inode *, qsize_t); |
316 | /* get reserved quota for delayed alloc */ | 318 | /* get reserved quota for delayed alloc, value returned is managed by |
317 | qsize_t (*get_reserved_space) (struct inode *); | 319 | * quota code only */ |
320 | qsize_t *(*get_reserved_space) (struct inode *); | ||
318 | }; | 321 | }; |
319 | 322 | ||
320 | /* Operations handling requests from userspace */ | 323 | /* Operations handling requests from userspace */ |
@@ -334,7 +337,7 @@ struct quotactl_ops { | |||
334 | 337 | ||
335 | struct quota_format_type { | 338 | struct quota_format_type { |
336 | int qf_fmt_id; /* Quota format id */ | 339 | int qf_fmt_id; /* Quota format id */ |
337 | struct quota_format_ops *qf_ops; /* Operations of format */ | 340 | const struct quota_format_ops *qf_ops; /* Operations of format */ |
338 | struct module *qf_owner; /* Module implementing quota format */ | 341 | struct module *qf_owner; /* Module implementing quota format */ |
339 | struct quota_format_type *qf_next; | 342 | struct quota_format_type *qf_next; |
340 | }; | 343 | }; |
@@ -376,6 +379,17 @@ static inline unsigned int dquot_generic_flag(unsigned int flags, int type) | |||
376 | return flags >> _DQUOT_STATE_FLAGS; | 379 | return flags >> _DQUOT_STATE_FLAGS; |
377 | } | 380 | } |
378 | 381 | ||
382 | #ifdef CONFIG_QUOTA_NETLINK_INTERFACE | ||
383 | extern void quota_send_warning(short type, unsigned int id, dev_t dev, | ||
384 | const char warntype); | ||
385 | #else | ||
386 | static inline void quota_send_warning(short type, unsigned int id, dev_t dev, | ||
387 | const char warntype) | ||
388 | { | ||
389 | return; | ||
390 | } | ||
391 | #endif /* CONFIG_QUOTA_NETLINK_INTERFACE */ | ||
392 | |||
379 | struct quota_info { | 393 | struct quota_info { |
380 | unsigned int flags; /* Flags for diskquotas on this device */ | 394 | unsigned int flags; /* Flags for diskquotas on this device */ |
381 | struct mutex dqio_mutex; /* lock device while I/O in progress */ | 395 | struct mutex dqio_mutex; /* lock device while I/O in progress */ |
@@ -383,7 +397,7 @@ struct quota_info { | |||
383 | struct rw_semaphore dqptr_sem; /* serialize ops using quota_info struct, pointers from inode to dquots */ | 397 | struct rw_semaphore dqptr_sem; /* serialize ops using quota_info struct, pointers from inode to dquots */ |
384 | struct inode *files[MAXQUOTAS]; /* inodes of quotafiles */ | 398 | struct inode *files[MAXQUOTAS]; /* inodes of quotafiles */ |
385 | struct mem_dqinfo info[MAXQUOTAS]; /* Information for each quota type */ | 399 | struct mem_dqinfo info[MAXQUOTAS]; /* Information for each quota type */ |
386 | struct quota_format_ops *ops[MAXQUOTAS]; /* Operations for each type */ | 400 | const struct quota_format_ops *ops[MAXQUOTAS]; /* Operations for each type */ |
387 | }; | 401 | }; |
388 | 402 | ||
389 | int register_quota_format(struct quota_format_type *fmt); | 403 | int register_quota_format(struct quota_format_type *fmt); |