Merge branch 'sched/urgent' into sched/core
[safe/jmp/linux-2.6] / include / linux / quota.h
index 54b837f..a6861f1 100644 (file)
@@ -73,6 +73,8 @@
 /* Quota format type IDs */
 #define        QFMT_VFS_OLD 1
 #define        QFMT_VFS_V0 2
+#define QFMT_OCFS2 3
+#define        QFMT_VFS_V1 4
 
 /* Size of block in which space limits are passed through the quota
  * interface */
@@ -277,8 +279,6 @@ struct dquot {
        struct mem_dqblk dq_dqb;        /* Diskquota usage */
 };
 
-#define NODQUOT (struct dquot *)NULL
-
 #define QUOTA_OK          0
 #define NO_QUOTA          1
 
@@ -311,6 +311,13 @@ struct dquot_operations {
        int (*write_info) (struct super_block *, int);  /* Write of quota "superblock" */
        /* reserve quota for delayed block allocation */
        int (*reserve_space) (struct inode *, qsize_t, int);
+       /* claim reserved quota for delayed alloc */
+       int (*claim_space) (struct inode *, qsize_t);
+       /* release rsved quota for delayed alloc */
+       void (*release_rsv) (struct inode *, qsize_t);
+       /* get reserved quota for delayed alloc, value returned is managed by
+        * quota code only */
+       qsize_t *(*get_reserved_space) (struct inode *);
 };
 
 /* Operations handling requests from userspace */
@@ -330,7 +337,7 @@ struct quotactl_ops {
 
 struct quota_format_type {
        int qf_fmt_id;  /* Quota format id */
-       struct quota_format_ops *qf_ops;        /* Operations of format */
+       const struct quota_format_ops *qf_ops;  /* Operations of format */
        struct module *qf_owner;                /* Module implementing quota format */
        struct quota_format_type *qf_next;
 };
@@ -372,6 +379,17 @@ static inline unsigned int dquot_generic_flag(unsigned int flags, int type)
        return flags >> _DQUOT_STATE_FLAGS;
 }
 
+#ifdef CONFIG_QUOTA_NETLINK_INTERFACE
+extern void quota_send_warning(short type, unsigned int id, dev_t dev,
+                              const char warntype);
+#else
+static inline void quota_send_warning(short type, unsigned int id, dev_t dev,
+                                     const char warntype)
+{
+       return;
+}
+#endif /* CONFIG_QUOTA_NETLINK_INTERFACE */
+
 struct quota_info {
        unsigned int flags;                     /* Flags for diskquotas on this device */
        struct mutex dqio_mutex;                /* lock device while I/O in progress */
@@ -379,7 +397,7 @@ struct quota_info {
        struct rw_semaphore dqptr_sem;          /* serialize ops using quota_info struct, pointers from inode to dquots */
        struct inode *files[MAXQUOTAS];         /* inodes of quotafiles */
        struct mem_dqinfo info[MAXQUOTAS];      /* Information for each quota type */
-       struct quota_format_ops *ops[MAXQUOTAS];        /* Operations for each type */
+       const struct quota_format_ops *ops[MAXQUOTAS];  /* Operations for each type */
 };
 
 int register_quota_format(struct quota_format_type *fmt);