+/* In the hash for lustre_qunit_size, the key is decided by
+ * grp_or_usr and uid/gid, in here, I combine these two values,
+ * which will make comparing easier and more efficient */
+#define LQS_KEY(is_grp, id) ((is_grp ? 1ULL << 32: 0) + id)
+#define LQS_KEY_ID(key) (key & 0xffffffff)
+#define LQS_KEY_GRP(key) (key >> 32)
+
+static inline void __lqs_getref(struct lustre_qunit_size *lqs)
+{
+ int count = cfs_atomic_inc_return(&lqs->lqs_refcount);
+
+ if (count == 2) /* quota_create_lqs */
+ cfs_atomic_inc(&lqs->lqs_ctxt->lqc_lqs);
+ CDEBUG(D_INFO, "lqs=%p refcount %d\n", lqs, count);
+}
+