Whamcloud - gitweb
LU-7991 quota: project quota against ZFS backend
[fs/lustre-release.git] / lustre / include / lustre_quota.h
index b7ecbdb..8cb25d2 100644 (file)
@@ -21,7 +21,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright (c) 2012, Intel Corporation.
+ * Copyright (c) 2012, 2014, Intel Corporation.
  * Use is subject to license terms.
  */
 
@@ -32,8 +32,9 @@
  *
  */
 
-#include <linux/lustre_quota.h>
-
+#include <linux/fs.h>
+#include <linux/quota.h>
+#include <linux/quotaops.h>
 #include <dt_object.h>
 #include <lustre_fid.h>
 #include <lustre_dlm.h>
@@ -58,6 +59,13 @@ union lquota_rec {
        struct lquota_acct_rec  lqr_acct_rec;
 };
 
+/* flags for inode/block quota accounting */
+enum osd_qid_declare_flags {
+       OSD_QID_INODE   = 1 << 0,
+       OSD_QID_BLK     = 1 << 1,
+       OSD_QID_FORCE   = 1 << 2,
+};
+
 /* Index features supported by the global index objects
  * Only used for migration purpose and should be removed once on-disk migration
  * is no longer needed */
@@ -178,10 +186,6 @@ void qsd_op_end(const struct lu_env *, struct qsd_instance *,
                struct lquota_trans *);
 void qsd_op_adjust(const struct lu_env *, struct qsd_instance *,
                   union lquota_id *, int);
-/* This is exported for the ldiskfs quota migration only,
- * see convert_quota_file() */
-int lquota_disk_write_glb(const struct lu_env *, struct dt_object *,
-                         __u64, struct lquota_glb_rec *);
 
 /*
  * Quota information attached to a transaction
@@ -226,6 +230,7 @@ struct lquota_trans {
 #define QUOTA_FL_OVER_USRQUOTA  0x01
 #define QUOTA_FL_OVER_GRPQUOTA  0x02
 #define QUOTA_FL_SYNC           0x04
+#define QUOTA_FL_OVER_PRJQUOTA  0x08
 
 #define IS_LQUOTA_RES(res)                                             \
        (res->lr_name.name[LUSTRE_RES_ID_SEQ_OFF] == FID_SEQ_QUOTA ||   \