* GPL HEADER END
*/
/*
- * Copyright (c) 2012, 2014, Intel Corporation.
+ * Copyright (c) 2012, 2017, Intel Corporation.
* Use is subject to license terms.
*/
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 */
* enforcement. Arguments are documented where each function is defined. */
struct qsd_instance *qsd_init(const struct lu_env *, char *, struct dt_device *,
- struct proc_dir_entry *);
+ struct proc_dir_entry *, bool is_md);
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 *);
bool lqi_is_blk;
};
-/* Since we enforce only inode quota in meta pool (MDTs), and block quota in
- * data pool (OSTs), there are at most 4 quota ids being enforced in a single
- * transaction, which is chown transaction:
+/* With the DoM, both inode quota in meta pool and block quota in data pool
+ * will be enforced at MDT, there are at most 4 quota ids being enforced in
+ * a single transaction for inode and block quota, which is chown transaction:
* original uid and gid, new uid and gid.
*
* This value might need to be revised when directory quota is added. */
-#define QUOTA_MAX_TRANSIDS 4
+#define QUOTA_MAX_TRANSIDS 8
/* all qids involved in a single transaction */
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 || \