Whamcloud - gitweb
LU-7805 llite: Remove unused members of struct ll_sb_info
[fs/lustre-release.git] / lustre / include / lustre_quota.h
index 131b7d9..2bb8c20 100644 (file)
@@ -21,7 +21,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright (c) 2011, 2012, Intel, Inc.
+ * Copyright (c) 2012, 2014, Intel Corporation.
  * Use is subject to license terms.
  */
 
  *
  */
 
-#if defined(__linux__)
-#include <linux/lustre_quota.h>
-#elif defined(__APPLE__)
-#include <darwin/lustre_quota.h>
-#elif defined(__WINNT__)
-#include <winnt/lustre_quota.h>
-#error Unsupported operating system.
-#endif
-
+#include <linux/fs.h>
+#include <linux/quota.h>
+#include <linux/quotaops.h>
 #include <dt_object.h>
 #include <lustre_fid.h>
 #include <lustre_dlm.h>
 
+#ifndef MAX_IQ_TIME
+#define MAX_IQ_TIME  604800     /* (7*24*60*60) 1 week */
+#endif
+
+#ifndef MAX_DQ_TIME
+#define MAX_DQ_TIME  604800     /* (7*24*60*60) 1 week */
+#endif
+
+#ifndef LL_MAXQUOTAS
+#define LL_MAXQUOTAS 2
+#endif
+
 struct lquota_id_info;
 struct lquota_trans;
 
@@ -161,13 +167,13 @@ struct qsd_instance;
  *                 operation is declared, qsd_op_end() should be called only
  *                 once for the whole transaction.
  *
- * - qsd_adjust_quota(): triggers pre-acquire/release if necessary.
+ * - qsd_op_adjust(): triggers pre-acquire/release if necessary.
  *
  * Below are the function prototypes to be used by OSD layer to manage quota
  * enforcement. Arguments are documented where each function is defined.  */
 
 struct qsd_instance *qsd_init(const struct lu_env *, char *, struct dt_device *,
-                             cfs_proc_dir_entry_t *);
+                             struct proc_dir_entry *);
 int qsd_prepare(const struct lu_env *, struct qsd_instance *);
 int qsd_start(const struct lu_env *, struct qsd_instance *);
 void qsd_fini(const struct lu_env *, struct qsd_instance *);
@@ -175,8 +181,8 @@ int qsd_op_begin(const struct lu_env *, struct qsd_instance *,
                 struct lquota_trans *, struct lquota_id_info *, int *);
 void qsd_op_end(const struct lu_env *, struct qsd_instance *,
                struct lquota_trans *);
-void qsd_adjust_quota(const struct lu_env *, struct qsd_instance *,
-                     union lquota_id *, int);
+void qsd_op_adjust(const struct lu_env *, struct qsd_instance *,
+                  union lquota_id *, int);
 
 /*
  * Quota information attached to a transaction